feat: chain track 5 frames so a moving object is re-seeded (REQ-189)

trackForward sent the identical box to all five target frames. On batch 19
(extracted at 0.5 fps - one frame every 2 s) a truck entering the frame
outruns a static seed, so the action either missed it or grabbed the wrong
part.

- geometry handling lifted to module-level shapeBox(), reused for the drawn
  shape and for each assist result
- first frame still uses the drawn box exactly; frames 2-5 are seeded with
  the previous run's shape grown x1.5 about its centre (SEED_GROWTH)
- a frame SAM3 refuses keeps the last good seed for the next attempt
- REQ-189 rewritten to the chaining contract, including the accepted cost:
  a bad read can carry forward; this is not tracking, no motion model
This commit is contained in:
asus committed 2026-10-05 12:21:18 +07:00
1 parent b71f1d4bf2
commit 1530bbc999
4 files changed
+73 -26

No files matched your search

+11 -7
View File
@@ -170,13 +170,17 @@ changes.
one object and the model produces its shape.
- **REQ-189** — In the review editor, the user can push the **selected shape's** box forward
with *Track 5 Frames* (`[T]`): the next five frames each get their own REQ-043 box-assist
run, seeded with that box, and the shape is written as `source=manual`. Both geometry types
work — a bbox shape supplies its own box, a polygon is reduced to its bounding box. Each
frame is an **independent** run: a frame SAM3 refuses (nothing inside the box) is reported
and the rest still run; nothing selected, an unusable shape, or the last frame says so
instead of doing nothing. This is one-shot hand-off across the next frames, **not**
propagation of drawn exemplars (which stays a non-goal): nothing is carried frame to frame,
and the runs do not depend on each other.
run, and the shape is written as `source=manual`. Both geometry types work — a bbox shape
supplies its own box, a polygon is reduced to its bounding box. Runs are **chained, not
independent**: the first frame gets the drawn box untouched, and after each successful run
that run's resulting shape seeds the next frame, grown about its centre by ×1.5 so the
object has room to have moved. A frame SAM3 refuses (nothing inside the box) is reported
and the run continues from the last good seed. Nothing selected, an unusable shape, or the
last frame says so instead of doing nothing. Known cost of chaining: a wrong read on one
frame can carry into the ones after it — the result banner reports only what happened. This
is one-shot hand-off across the next frames, **not** propagation of drawn exemplars (which
stays a non-goal): nothing is tracked frame-to-frame with a motion model, and the runs do
not share state between invocations.
- **REQ-044** — All annotations and review statuses are **persistent** — they survive a
server restart, unlike today's in-memory sessions.
- **REQ-045** — Review progress is visible (e.g. "120/300 reviewed"), and a batch can only