Skip to content

Display detections flagged with a suppression attribute as suppressed#1785

Open
mattdawkins wants to merge 5 commits into
mainfrom
feat/attribute-suppression
Open

Display detections flagged with a suppression attribute as suppressed#1785
mattdawkins wants to merge 5 commits into
mainfrom
feat/attribute-suppression

Conversation

@mattdawkins

@mattdawkins mattdawkins commented Jul 21, 2026

Copy link
Copy Markdown
Member

Behavior

Suppression regions (#1760) hide detections lying under a region. A detection can also be marked suppressed by an attribute — an attribute named after the suppression type ("Suppressed" by default) set true by a pipeline or user — while sitting outside any region. Previously such a detection displayed as its normal type and counted normally, with nothing indicating its suppressed status.

A detection carrying the suppression attribute (on the track, or on the detection at the current frame) is now treated as a display-only special case:

  • Stays visible (region suppression is unchanged: detections under a region are still hidden).
  • Labeled Type - SuppressionType (e.g. B - Suppressed) in the canvas text and hover tooltip.
  • Blended styling: colored and faded with a 2/3 : 1/3 blend of the suppression type's and the suppression type's color/opacity (TypeStyling.suppressedColor / suppressedOpacity; the weight is a single constant).
  • Doesn't count toward its own type: excluded from the type list's dataset totals and per-frame counts, and the composite label never appears as a type-list category.
  • Real type preserved: selecting the detection still shows its actual type in the details panel, which remains editable — the attribute only overrides display, never the stored type.
  • The blend survives edit mode: editing is set on every annotation while an edit is active, and the text layer's editing branch previously stripped the suppressed styling from every other label until the edit ended.

Also included

  • The suppression-region overlap threshold is now configurable (Type Settings → "Suppression Overlap %"), defaulting to 99% instead of the previous hardcoded 50%.

Recognized attribute values: true, nonzero numbers, and 'true' / 'yes' / 'on' / '1' in any case. On interpolated frames the check falls back to the previous keyframe's detection attributes. Unit tests cover the attribute parsing, threshold normalization and behavior, and the weighted style blending.

🤖 Generated with Claude Code

mattdawkins and others added 3 commits July 21, 2026 17:13
A detection outside any suppression region can carry an attribute named
after the suppression type ("Suppressed" by default), set on the track
or on the detection at a frame. Such a detection now stays visible but
is treated as suppressed for display purposes:

- it inherits the suppression type's style (color, opacity, fill) and
  its canvas label and hover tooltip show the suppression type, via a
  styleType override in LayerManager;
- it no longer counts toward its own type in the type-list totals or
  the per-frame counts;
- selecting it still shows its real type, which remains editable; the
  attribute only overrides display, never the stored type.

Attribute values true, nonzero numbers, and 'true'/'yes'/'on'/'1' (any
case) are all recognized. Interpolated frames fall back to the previous
keyframe's detection attributes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Region suppression previously hid any detection lying >=50% under a
suppression region. The minimum covered fraction is now a setting
(Type Settings > Suppression Overlap %), defaulting to 95%, so only
detections almost entirely under a region are hidden and excluded from
counts. Out-of-range or missing values fall back to the default.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A detection that carries the suppression attribute (without lying under
a suppression region, which stays hidden as before) now renders as a
display-only special case instead of purely as the suppression type:

- labeled 'Type - SuppressionType' (e.g. 'B - Suppressed') in the
  canvas text and hover tooltip;
- colored and faded with an even 50/50 blend of its own type's and the
  suppression type's color/opacity (TypeStyling gains suppressedColor /
  suppressedOpacity helpers; the weight is a single constant).

The composite label is purely visual: the detection keeps its real
type, 'B - Suppressed' never appears as a type-list category, and
attribute-suppressed detections remain excluded from the type counts
and the track list.

The blend also survives edit mode: 'editing' is set on every
annotation while an edit is active, and TextLayer's editing branch
previously returned the plain type color, stripping the suppressed
styling from every other label until the edit ended.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mattdawkins
mattdawkins force-pushed the feat/attribute-suppression branch from e46356d to 5852bec Compare July 23, 2026 01:29
mattdawkins and others added 2 commits July 22, 2026 22:49
The attribute-suppressed composite styling now mixes 2/3 of the
suppression type's color/opacity with 1/3 of the detection's own type,
instead of an even split.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mattdawkins
mattdawkins requested a review from BryonLewis July 23, 2026 13:02
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.

1 participant