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
This commit is contained in:
jetson committed 2026-09-22 11:10:41 +07:00
1 parent 163280078f
commit fc20a521ee
5 files changed
+381 -40

No files matched your search

+10
View File
@@ -255,6 +255,16 @@ def api_cancel_job(job_id):
return jsonify({"error": "cannot cancel job in state " + job.status.name}), 400
@app.route("/api/jobs/active")
def api_active_jobs():
"""Return count of running/pending jobs."""
active = [j for j in job_queue.list_jobs() if j.status.name in ('RUNNING', 'PENDING')]
return jsonify({
"count": len(active),
"jobs": [{"job_id": j.job_id, "status": j.status.name, "video": os.path.basename(j.video_path)} for j in active],
})
@app.route("/api/jobs/<job_id>", methods=["DELETE"])
def api_delete_job(job_id):
"""Delete a completed/failed/cancelled job."""