- SyntheticIdAssigner: track_id=None dets get stable negative IDs so the
stabilizer hold bridges sup_det_interval gaps -> no flicker, boxes count
- apply primary model class filter in merged path (UI checkboxes work)
- _suppress_sacks_under_boxes: sack dets overlapping box dets dropped
(models without box class label boxes as sack; stops double counting)
- default web port 9000 -> 9050 (WEB_PORT env still overrides)
- README: port refs, counting zone modes section, project tree
- 140 tests pass (+13)
Tests imported the global job_queue (bound to real OUTPUT_DIR), creating
8 junk job-* dirs per pytest run (test_app x3, test_download_compress x4,
test_preview x1). Fixture redirects _output_dir to tmp_path and clears
the job registry before each test.
- Primary model uses ByteTrackTracker.update() every frame (gives track_ids)
- Supplementary models run every 5th frame only (reduces GPU load N->1)
- Counter only receives detections with track_id (fixes zero counts)
- Dashboard draws all detections (tracker + supplementary merged)
- Multiple models run simultaneously on each frame via ThreadPoolExecutor
- Detections merged with IoU deduplication (same class, high overlap → keep highest conf)
- Single merged_annotated.mp4 output (not per-model videos)
- Single model still uses existing run_pipeline for backward compat
- Active jobs banner on upload page (polls every 5s)
- GPU warning when selecting 3+ models
- 62/62 tests pass
- Added live preview (MJPEG), auto truck detection, video reuse/delete
- Added abort button, model groups with format dropdown
- Updated API endpoints table with all current routes
- Added configuration section with env variables
- Added model formats and truck detection sections
- Updated project structure with preview.py
The legacy batch_mgr.update() method was calling update_truck() with
truck_centroid=None, which prevented the batch from transitioning
from IDLE to TRUCK_STABILIZING (centroid must be non-None).
Now pipeline computes centroid from ROI and passes it through.
Verified: old run had 0 cyan pixels (no tracking), new run has 28190
cyan pixels (tracking active, bounding boxes drawn).
When a model without 'truck' class is selected (best, karung-dimuat,
yolo11n-bbox), the pipeline now automatically loads the truck-detector
model for truck detection. This ensures the batch manager transitions
to COUNTING_SACKS state and draws bounding boxes on output video.
Changes:
- Added find_truck_detector() helper in model_registry.py
- Added truck_model_config parameter to run_pipeline()
- job.py auto-selects truck-detector when model lacks truck class
- Verified with best.engine + batch-3.mp4: bounding boxes drawn