feat: per-class exemplar preview, class hide toggle, container NMS flag (REQ-182, REQ-183, REQ-184)

This commit is contained in:
asus committed 2026-10-02 11:11:33 +07:00
1 parent 1a99f2ffe4
commit 96a00267d9
18 files changed
+537 -124

No files matched your search

+28 -4
View File
@@ -95,8 +95,11 @@ changes.
- **REQ-030** — Once frames are extracted, the system runs SAM3 over all of them using each
class's prompt, as a background job with progress and cancellation.
- **REQ-031** — Detections that overlap across prompts are deduplicated (greedy IoU NMS), so
one object is not labelled as two classes at once.
- **REQ-031** — Detections that overlap across prompts are deduplicated (greedy IoU NMS
across classes, threshold = the lower-scoring detection's class IoU override if set,
else the job's global IoU), so one object is not labelled as two classes at once. A
detection contained inside a higher-scoring box of a class marked container (REQ-184)
is never removed by that box — containment is not overlap.
- **REQ-032** — The confidence threshold is configurable per job.
- **REQ-181** — Auto-annotation accepts per-class overrides of confidence, IoU and minimum box
fraction on top of the job's global values; classes without an override use the global
@@ -122,8 +125,16 @@ changes.
re-run immediately, and can be undone or cleared. Exemplars are a **tuning aid only**: they
are never written as annotations and never carried into the batch job, because SAM3's
geometric prompts pool features from the current image — replaying them on another frame
would ask about whatever happens to sit at those coordinates there. They belong to exactly
one class, so a new frame or a new active class discards them.
would ask about whatever happens to sit at those coordinates there. Each class keeps its own
pool on the current frame: switching the active class shows that class's pool instead of
discarding the others, and a new frame discards them all.
- **REQ-182** — The auto-annotate preview is **per class and accumulates**. While at least one
class has example boxes on the previewed frame, the preview shows only the classes that have
examples, each conditioned on its own pool; re-drawing one class's example refreshes only
that class's predictions and leaves the other exemplared classes' results on screen. Classes
without examples contribute nothing while any example exists, and clearing the last example
restores the plain full-set preview. The preview and the batch job still use the same
thresholds and per-class overrides.
## E. Review & correction
@@ -174,6 +185,19 @@ changes.
- **REQ-180** — In the manual review editor, each class row can clear that class's shapes on
the **current frame only** (REQ-046 stays batch-wide). One click, no confirmation dialog;
the next frame is untouched.
- **REQ-183** — In the manual review editor, each class row has a **hide toggle**. A hidden
class's shapes disappear from both the annotation canvas and the "Shapes on this frame"
list — not selectable, not marquee-selectable, not deletable while hidden — while the class
row keeps its real per-frame count and its eye state, so what is hidden stays visible as
state. The choice is session state: it survives frame changes, resets when the review page
is left, and never touches stored data.
- **REQ-184** — A class can be marked as **container** (persisted on
`project_classes.container`, edited next to the per-class overrides in the auto-annotate
modals). When the cross-class NMS of REQ-031 compares another class's box against a
higher-scoring box of a container class, containment is not overlap: if at least 90% of
the smaller box's area lies inside the container's box, both survive. The flag changes
nothing else — unmarked classes are governed by IoU alone — and preview and batch job
read the same stored flag.
## E4. Live counting preview