Commit Graph
13 Commits
Author SHA1 Message Date
jetson 7c91081ea8 feat: add zone_mode and fixed_zone fields to Job 2026-09-22 13:03:37 +07:00
jetson fc20a521ee feat: merged detection output + parallel model execution
- 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
2026-09-22 11:10:41 +07:00
jetson 163280078f fix: toggle preview display bug, add job deletion, optimize pipeline
- Fix: toggle ON now resets img display to block (was stuck on 'waiting')
- Toggle OFF sends API call to stop preview file writes
- Delete button on status page + jobs page cards
- DELETE /api/jobs/<id> endpoint removes job + output files
- PUT /api/jobs/<id>/preview endpoint toggles preview_enabled
- Pipeline skips resize/encode/write when preview_enabled=False
- Reduced preview defaults: 480px max, JPEG quality 60
- 62/62 tests pass
2026-09-22 10:49:06 +07:00
jetson 09a8829575 feat: live preview toggle, FPS indicator, live counting by object
- Toggle ON/OFF switch to disable preview (faster processing)
- FPS badge showing rolling average processing speed
- Live Loading/Unloading/Net counts updated in real-time
- Pipeline callback pushes stats every 10 frames
- Frontend polls and updates display every 2s
- 62/62 tests pass
2026-09-22 10:36:11 +07:00
jetson a5566f3b99 feat: switch live preview from WebSocket to MJPEG streaming
- Pipeline writes JPEG to /tmp/feedmill_preview_{job_id}.jpg (atomic)
- Flask serves MJPEG stream at /api/preview/{job_id}
- Frontend uses native <img src> MJPEG — zero JS needed
- Removed flask-socketio, eventlet, socket.io CDN dependencies
- 33% less bandwidth per frame, native browser decode
- Same proven approach as original karung-counting project
2026-09-22 10:09:22 +07:00
jetson 57afb62542 fix: auto-use truck-detector when model lacks truck class
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
2026-09-21 13:37:01 +07:00
jetson f9e411f407 feat: 15+ FPS live preview via WebSocket push
- flask-socketio + threading mode (no eventlet monkey-patching)
- preview_queue in pipeline: downscale to 640p, JPEG encode, bounded queue
- encoder thread per job reads queue → SocketIO broadcast to room
- Frontend: SocketIO client replaces HTTP polling, handles preview_frame event
- Configurable: preview_every_n, preview_max_dim, preview_jpeg_quality
- 62/62 tests pass
2026-09-21 11:07:42 +07:00
jetson 93daa68668 fix: add explicit GPU memory cleanup between models to prevent OOM 2026-09-21 10:19:29 +07:00
jetson 6783ff3970 feat: add abort button for job cancellation 2026-09-21 09:40:57 +07:00
jetson 87c8da3961 fix(job): clear latest_frame on pipeline failure 2026-09-17 16:14:18 +07:00
jetson f487b5cf03 feat(pipeline): emit live annotated frames for preview 2026-09-17 16:12:35 +07:00
jetson 2b54cc3353 fix: final review wave — CLI kwargs, class filter, job locks, upload order, tests 2026-09-16 15:14:44 +07:00
jetson e13926d57d feat: async job queue with thread-safe add/get/cancel/list 2026-09-16 14:55:24 +07:00