feat: per-class max box fraction (REQ-188)

- labeling/preview/autolabel: max_box_frac + per-class max_box_fracs
  ceiling filter (0=none, 1=off) before NMS, mirrors min_box_frac
- exemplar review-assist: ceiling before max_detections truncation;
  ExemplarLabelRequest + filter panel 'Max box size' slider
- ClassParamsTable: MaxBox column; copy line now REQ-186 amended
  order: class <name> conf <v> iou <v> minbox <v> maxbox <v> container
- docs: design/ui-spec/tasks updated (incl. stale 4-slider narrative)
This commit is contained in:
asus committed 2026-10-02 17:27:11 +07:00
1 parent dee58e4ae5
commit d3a6aa49b6
13 files changed
+90 -25

No files matched your search

+8 -7
View File
@@ -450,7 +450,7 @@ Two columns inside one dialog (920 px wide, max 96 vw / 90 vh, scrollable).
- NMS IoU threshold — 0…0.9 step 0.05, default 0.0.
- Min box size (fraction of frame) — 0…0.5 step 0.005, default 0, shown as a percentage.
- **Per-class overrides** (REQ-181) — a compact table below the sliders, one row per currently
selected class: `Conf` / `IoU` / `MinBox` number inputs and a **Container** checkbox
selected class: `Conf` / `IoU` / `MinBox` / `MaxBox` number inputs and a **Container** checkbox
(REQ-184). Each input's placeholder shows the current global value and an empty input
inherits it; only filled cells are sent, as
`class_params` on **both** the preview and the job request, so preview and run cannot
@@ -465,7 +465,7 @@ Two columns inside one dialog (920 px wide, max 96 vw / 90 vh, scrollable).
- **Copy (REQ-186)** — small right-aligned ghost button above the overrides table; label
`Copy`, flips to `Copied` for 1.5 s inside an `aria-live` span, and on failure silently
stays `Copy`. One line per selected class, e.g.
`class sack conf 0.4 iou 0.6 minbox 0.005 container false` — an empty input copies the
`class sack conf 0.4 iou 0.6 minbox 0.005 maxbox 1 container false` — an empty input copies the
global value. Present in the engine-chooser modal **and** the mass modal (shared
component).
- `ClassPromptPanel`:
@@ -1024,13 +1024,14 @@ over the frame** — the shapes it governs are drawn on the canvas, and a card o
covers the thing being judged. It scrolls itself into view on mount, because the sidebar
scrolls and a decision the user cannot see is not a decision.
Its four sliders, re-previewing on a 250 ms debounce:
Its five sliders, re-previewing on a 250 ms debounce:
| Key | Label | Range | Default | Hint |
|---|---|---|---|---|
| `threshold` | Confidence | 0.05–0.95 | 0.5 | lower finds more, and more junk |
| `iou_threshold` | Overlap (NMS) | 0.1–1 | 0.8 | boxes overlapping this much are one object; lower deletes more |
| `min_box_frac` | Min box size | 0–0.05 | 0.002 | shown as % of frame; higher deletes more |
| `max_box_frac` | Max box size | 0–1 | 1.0 | shown as % of frame; boxes bigger than this are junk, 100% = off |
| `max_detections` | Max shapes | 5–300 | 100 | keep only the highest-scoring N |
Panel header: `Auto-label "<class>"` + *Undo* (drops the last example drawn). Status line:
@@ -1062,7 +1063,7 @@ POST /api/frames/{id}/exemplar-label
{ "exemplars": [{ "box": [x0,y0,x1,y1], "positive": true }],
"class_id": 0,
"threshold": 0.5, "iou_threshold": 0.8,
"min_box_frac": 0.002, "max_detections": 100,
"min_box_frac": 0.002, "max_box_frac": 1.0, "max_detections": 100,
"apply": false }
→ { "shapes": [{ "geometry", "score", "source": "manual"|"auto" }],
"applied": false, "redetected": true, "message": null,
@@ -1072,7 +1073,7 @@ POST /api/frames/{id}/exemplar-label
Server-side, positives become `source="manual"` and survive a batch re-run; what SAM3 adds
becomes `source="auto"` and is replaceable. Detections overlapping a negative by ≥0.3 are
dropped; ones overlapping a positive by ≥0.6 are dropped as already covered. The panel's
filters run first, in the batch job's order: area floor → NMS → cap.
filters run first, in the batch job's order: area floor → ceiling → NMS → cap.
**GPU-lock timeout is 5 s here** (versus 20 s for `assist`) because this fires from a mouse
gesture. On timeout the response carries `redetected: false`, a message the panel shows, and
@@ -1527,8 +1528,8 @@ Shortcuts).
- Dua mode: **Draw** / **Select** (`V`). Select mode tidak pernah mengubah geometri; Draw mode
tidak marquee.
- **Di draw mode, drag bukan menggambar kotak — itu adalah *contoh*.** User menggambar satu
instance, SAM3 mencari sisanya, hasilnya di-*preview*, di-*tune* lewat 4 slider (Confidence,
Overlap/NMS, Min box size, Max shapes), lalu baru **Apply** yang menulis. Shift-drag = contoh
instance, SAM3 mencari sisanya, hasilnya di-*preview*, di-*tune* lewat 5 slider (Confidence,
Overlap/NMS, Min box size, Max box size, Max shapes), lalu baru **Apply** yang menulis. Shift-drag = contoh
negatif ("bukan ini"). Panel filter duduk di **sidebar**, bukan menutupi frame.
- Tahan `S` = SAM3 click-assist (satu box → satu shape).
- Keyboard-first: `V ← → A X U N C T 1–9 Del H Esc Enter`. Semua aksi punya shortcut; panel