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

+16
View File
@@ -43,6 +43,22 @@ version tags are cut in this repo — POC stage, `main` is the release line).
- `MOTIONEYE_CLIP_PAD` (default ±3 s window padding) + OSD-clock alignment via
single-frame OCR at each cut point (`MOTIONEYE_OSD_ALIGN`, default on).
### Fixed
- **Premature auto-batch finalization on big docked trucks** (batch 15 split
`6` + `276`, 2026-09-29 14:07): truck gate now requires **≥50 % bbox
overlap** with `detection_polygon` instead of 100 % containment — the docked
truck's bbox rested 1–2 px past the polygon's bottom edge, so
`truck_in_area` flickered `False` for 30 s while the truck never left.
Frame replay with `v4-best.engine` detected the truck at conf 0.92–0.97 in
**every** frame (no model miss → no retraining needed).
- `batch.truck_gone_tolerance_seconds` (new, default 30) is now the only
truck-gone finalize timer: the hardcoded
`batch_mgr._truck_gone_tolerance = 30.0` override in `predict.py` is gone,
`batch.timeout_seconds` governs sack-idle pause only (comments inline in
`config.yaml`), and `--batch-timeout` overrides both for dev runs.
- Added `[TRUCK] truck_in_area False -> True` transition debug log (state,
valid-truck count, best bbox + conf) for future lifecycle incidents.
### Changed
- OCR engine default **`rapid`** (was `tesseract`) across `config.yaml`,
`DoConfig`, `empty_do_settings`, `extract_do_fields`; `ocr_engine` write