22 Commits
Author SHA1 Message Date
jetson 1c26f9f95b feat(zones): use native 1080p zones, sync FCP main, and auto-sync default preset 2026-11-17 12:26:30 +07:00
jetson b9d4bd11b3 feat(counting): align max_step_dy (160) and unload_confirm (1) with FCP main 2026-11-17 11:15:35 +07:00
jetson 3cc0919fb1 feat(pipeline,config): sync detection thresholds, filter order, and multi-model tracking with FCP main 2026-11-17 10:19:54 +07:00
jetson ff55a733d6 feat(counting,zones): align corridor filter and default palet zone with FCP main 2026-11-17 09:39:47 +07:00
jetson 08a0e54065 feat(ui): paste/import zone JSON in the calibrator + surface editor in nav 2026-11-12 16:19:16 +07:00
jetson 6610a466ee fix(docs): scope the live-system claims and fix the RTSP instructions 2026-11-12 15:30:13 +07:00
jetson 0e76c096bb docs: zone calibration workflow, counting gates and the 1280x720 zone space 2026-11-12 14:39:17 +07:00
jetson 5c295c5849 feat(tools): record an RTSP stream for recounter/live parity runs 2026-11-12 14:32:05 +07:00
jetson bc537984d6 docs: sync README, ERD, changelog with model upload/conversion feature 2026-11-04 10:39:49 +07:00
jetson 1b032edfd3 feat: upload models and convert to .engine from web UI 2026-11-04 10:25:27 +07:00
jetson d3d58ffcde fix: harden the output lifecycle (range requests, temp files, job gate)
Review of the compression branch (ce93c68..d7c1415): one Important and the
cheap real Minors, each with a RED test first.

- app.py: drop the manual Content-Length override - it broke ranged
  requests (206 announcing the full length while sending a slice).
  send_file sets it and the 206/Content-Range itself.
- app.py: the download route serves video extensions only, never the temp
  of an encode in flight.
- src/compress.py: the encode temp is unique per attempt (mkstemp), is
  validated (playable video) and fsynced before it replaces the original;
  a failing os.replace keeps the original and cleans the temp up instead
  of raising into the route. The compressed video keeps the source mode.
- src/compress.py: a stale temp of a killed encode is swept after 2 h
  instead of the 5-day video expiry.
- src/job.py: cancelled and failed jobs are not re-encoded; the job shows
  "Compressing..." while the encode runs.
- ERD.md: the $OUTPUT_DIR/*_compressed.mp4 row is gone.

328 tests pass (was 319).
2026-10-28 15:47:28 +07:00
jetson d7c1415975 docs: changelog, README and plan for the one-video-per-job output lifecycle
CHANGELOG: a finished job leaves one compressed video (compressed in place
under the plain name) and the job videos expire after 5 days.

README: the output lifecycle - one video per job, 5-day retention.

Plan: the implementation plan this branch followed.
2026-10-28 15:13:23 +07:00
jetson 2ca4cb6c3d fix: degrade a broken zone calibration instead of publishing a wrong count
The whole-branch review found three ways a broken zones.json could reach a
published count:

- build_static_roi indexed the truck_area points directly, so a 1-element
  point (IndexError) or an infinite coordinate (OverflowError) escaped the
  app's guard and became a 500. It now reuses _scaled_points and raises
  ValueError, which the guard already handles.
- A missing or short truck_area fell back to an invented heuristic box that
  was still published as a calibrated "fixed" zone. It now degrades to
  dynamic mode instead.
- A degenerate (zero-area) counting polygon was built successfully and
  filtered out every detection, silently publishing zero counts. It is
  now rejected like any other malformed calibration.

Also: the app guard catches IndexError/KeyError/OverflowError, the zone
preset comment no longer claims 1920x1080 coordinates are authored for
1280x720, and two FCP citations are corrected.
2026-10-28 09:45:25 +07:00
jetson f8f3049531 fix: degrade to dynamic on an unreadable zone calibration 2026-10-27 14:01:24 +07:00
jetson d53e9426fb docs: changelog for the static-zone default (f4e7b5d) 2026-10-27 13:52:31 +07:00
jetson 7230e2b3c8 feat: config.yaml as single source of truth for tunables
- config.yaml (root): detection conf, iou thresholds (dedup/suppress/
  synthetic/sticky), roi (ema/deadband/freeze_after), stabilizer, intervals
- src/config.py: deep-merge file over built-in defaults, missing file safe
- pipelines resolve None-sig params from config; CLI --sack-conf/--truck-conf
  override; TruckROITracker sticky_iou param
- 163 tests pass (+8)
2026-10-13 10:02:43 +07:00
jetson 07289a419a perf: throttle tracker to every 2nd frame, sup interval 10, 720p output option
- detect_interval=2 on both pipelines; stabilizer 10-frame hold bridges
  skipped frames (GPU inference cut ~half during active batch)
- sup_det_interval 5 -> 10 (still <= stabilizer hold / synthetic max_age)
- preview_every_n default 2 -> 5
- AnnotatedVideoWriter: codec auto-chain gstreamer_nvenc -> avc1 -> mp4v,
  max_height downscale (even dims, INTER_AREA); backend logged
- output_max_height plumbed Job -> web checkbox (720p) -> CLI --output-height
- README: 720p option, CLI flag
- 153 tests pass (+13)
2026-09-29 15:58:55 +07:00
jetson ad41bf01e1 feat: stabilize secondary-model detections, box-wins suppression, port 9050
- 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)
2026-09-29 15:32:07 +07:00
jetson 39b582a481 docs: update README.md with current features and API
- 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
2026-09-22 10:18:36 +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 1377fbb77d docs: complete README with usage, CLI, API reference 2026-09-16 15:10:04 +07:00
jetson 7fb017488c init: project skeleton with pyproject.toml, config, tracker.yaml, README 2026-09-16 13:12:59 +07:00