fix(auto-batch): truck presence needs 50% polygon overlap, config-authoritative timers
ci / smoke (push) Canceled after 0s

Big docked truck bbox rests 1-2px past detection_polygon bottom edge, so
100%-containment made truck_in_area flicker False -> batch 15 split (6+276)
on 2026-09-29 while the truck never left. v4-best.engine detected it at
conf 0.92-0.97 in every replayed frame (no model miss, no retraining).

- truck gate: frac_inside >= 0.5 instead of contains(bbox)
- batch.truck_gone_tolerance_seconds (new, 30) authoritative; drop the
  hardcoded batch_mgr._truck_gone_tolerance = 30.0 override;
  batch.timeout_seconds documented as sack-idle pause only
- [TRUCK] truck_in_area transition debug log
This commit is contained in:
andrew committed 2026-09-30 09:40:15 +07:00
1 parent 12f921f81c
commit f621ae86fb
8 files changed
+74 -9

No files matched your search

+5 -1
View File
@@ -95,7 +95,11 @@ IDLE ──truck in area──▶ TRUCK_STABILIZING ──stable 5 s──▶ CO
- `on_batch_start(id, ts)` / `on_batch_end(BatchRecord)` callbacks — `main.py` uses them
to reset counter/stabilizer/ROI and to write the CSV row.
- Tunables: `stabilize_seconds=5`, `stabilize_threshold_px=15`, `sack_idle_timeout=10`,
`min_batch_duration=30`, `truck_gone_tolerance=3`.
`min_batch_duration=30`, `truck_gone_tolerance=3` (constructor defaults).
Live values from `predict.py`: `stabilize_seconds=0`, `min_batch_duration=5`,
`sack_idle_timeout` ← `config.yaml batch.timeout_seconds`,
`truck_gone_tolerance` ← `batch.truck_gone_tolerance_seconds` (both overridden
by `--batch-timeout` for dev runs).
### Dashboard overlay (`src/dashboard.py`)
Draws onto the frame: truck ROI box + confidence, counting-zone band + center line,