Skip to content

Suppression regions: hide and un-count detections beneath them#1760

Merged
BryonLewis merged 4 commits into
mainfrom
dev/suppression-regions
Jul 16, 2026
Merged

Suppression regions: hide and un-count detections beneath them#1760
BryonLewis merged 4 commits into
mainfrom
dev/suppression-regions

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Adds a "Suppression Region Type" setting (typeSettings.suppressionType, default Suppressed, empty disables) selectable in the type-settings panel.

Any detection whose geometry lies >=50% under an annotation of that type on a frame is:

  • hidden from every annotation layer, and
  • excluded from the per-frame type counts and the frame-filtered track list.

Overlap uses each side's polygon when it has one and its bounding box otherwise, estimated by point sampling, so concave warped field-of-view polygons are handled without adding a polygon-clipping dependency.

Motivation: multi-camera surveys (e.g. sea-lion) emit "Suppressed" field-of-view regions where another camera already covers the ground; this lets a reviewer read de-duplicated counts off the interface.

Add a "Suppression Region Type" setting (typeSettings.suppressionType, default
'Suppressed', empty disables) selectable in the type-settings panel. Any
detection whose geometry lies >=50% under an annotation of that type on a frame
is hidden from every annotation layer and excluded from the per-frame type
counts and the frame-filtered track list. Overlap uses each side's polygon when
it has one and its bounding box otherwise, estimated by point sampling so the
concave warped field-of-view polygons the sea-lion suppressor emits are handled
without a polygon-clipping dependency.
@mattdawkins
mattdawkins requested a review from BryonLewis July 15, 2026 21:16
mattdawkins and others added 3 commits July 15, 2026 18:03
Exclude fully-suppressed detections (every keyframe covered by a region, across
all cameras) from the dataset-wide per-type totals, and make both the totals
and the per-frame counts re-evaluate when a region is moved by depending on the
edit counter - a track's geometry is not itself a reactive dependency, so
without this the counts went stale while the canvas correctly hid detections.

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted some styling a bit to better fit the new option
Added an indicator in the type list to which type is being supressed with a tooltip explaining it
fixed a small issue with the size of the type list in the bottom bar view.

@BryonLewis
BryonLewis merged commit ef8a138 into main Jul 16, 2026
3 checks passed
@BryonLewis
BryonLewis deleted the dev/suppression-regions branch July 16, 2026 14:32
mattdawkins added a commit that referenced this pull request Jul 16, 2026
Brings in 8 commits, including suppression regions (#1760), the
multicam camera order fix (#1759), signal-killed pipeline handling
(#1752, #1761), the annotation rollback tombstone fix (#1751), CSV note
columns (#1753), and the vitest/ws dependabot bumps.

Viewer.vue merged cleanly: f557b21 restored the SealTK wiring that
merge 8b0ab93 had dropped, so the file no longer conflicts with main.

Two conflicts, both from suppression regions landing on main while
viame/master already carried its own copy:

* LayerManager.vue -- keep viame/master's ../utils import. main's copy
  of this file diverged and no longer needs those symbols, but the
  merged body still calls geojsonToBound, isRotationValue,
  ROTATION_ATTRIBUTE_NAME and featureHasSegmentationPolygon.
* TypeSettingsPanel.vue -- take main's suppression row (adds mt-5).

package.json resolves to main's vitest 4.1.10 bump (viame/master never
changed it off the 3.2.4 base) while keeping onnxruntime-web.

Verified: client tests 611/611 passing on Node 22, eslint clean, desktop
app builds and runs with no console errors, and on a multicam stereo
dataset ImportAnnotations still completes setup with no Annotation Set
combobox and a live openUpload.

Note: vitest 4 requires Node ^20 || ^22 || >=24, so `npm test` now fails
to start on Node 18. client/README.md still says "Requires Node 18+".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants