feat: CPU object detection, motion-gated recording, production deployment improvements #12

Merged
elirtf merged 1 commit from feat/adaptive-streaming into master 2026-06-17 15:25:39 +00:00
Owner

Object detection (CPU-only, OpenCV DNN):

  • MobileNet-SSD as second stage after motion — runs once per event, not per frame
  • Global semaphore bounds concurrent inference across camera workers
  • Graceful fallback when model files absent; no new Python deps beyond opencv
  • Detected labels stored in recording_event.detected_objects (comma-separated)
  • Notification messages include object labels when available (e.g. 'Person detected on Front Door')

Continuous motion-gated recording:

  • Replace old clip-per-cooldown model with FFmpeg subprocess that lives while
    motion persists + configurable linger window
  • Proper SIGTERM/process lifecycle management for clean clip finalisation
  • Re-arm gate (motion_cooldown_seconds) prevents rapid restart

Production deployment:

  • OPUS_ROLE env var to split API/processor/recorder across separate processes
  • go2rtc API/RTSP bind addresses configurable via GO2RTC_API_LISTEN/GO2RTC_RTSP_LISTEN
    for bare-metal security hardening
  • .dockerignore cleanup (secrets, runtime data excluded from image layers)
  • Docker build --no-cache-dir, NGINX hardening, health sampler improvements

Other:

  • Prometheus metrics for motion detection pipeline
  • Recording settings UI improvements (default duration display, NAS path hints)
  • Motion detection tuning: configurable contrast enhancement, lightning rejection,
    frame-delta accumulation alpha, per-camera motion mask presets
  • Auth: session refresh endpoint, go2rtc stream validation on login
  • Worker status server: expose recording state (active/since) for frontend
Object detection (CPU-only, OpenCV DNN): - MobileNet-SSD as second stage after motion — runs once per event, not per frame - Global semaphore bounds concurrent inference across camera workers - Graceful fallback when model files absent; no new Python deps beyond opencv - Detected labels stored in recording_event.detected_objects (comma-separated) - Notification messages include object labels when available (e.g. 'Person detected on Front Door') Continuous motion-gated recording: - Replace old clip-per-cooldown model with FFmpeg subprocess that lives while motion persists + configurable linger window - Proper SIGTERM/process lifecycle management for clean clip finalisation - Re-arm gate (motion_cooldown_seconds) prevents rapid restart Production deployment: - OPUS_ROLE env var to split API/processor/recorder across separate processes - go2rtc API/RTSP bind addresses configurable via GO2RTC_API_LISTEN/GO2RTC_RTSP_LISTEN for bare-metal security hardening - .dockerignore cleanup (secrets, runtime data excluded from image layers) - Docker build --no-cache-dir, NGINX hardening, health sampler improvements Other: - Prometheus metrics for motion detection pipeline - Recording settings UI improvements (default duration display, NAS path hints) - Motion detection tuning: configurable contrast enhancement, lightning rejection, frame-delta accumulation alpha, per-camera motion mask presets - Auth: session refresh endpoint, go2rtc stream validation on login - Worker status server: expose recording state (active/since) for frontend
Object detection (CPU-only, OpenCV DNN):
- MobileNet-SSD as second stage after motion — runs once per event, not per frame
- Global semaphore bounds concurrent inference across camera workers
- Graceful fallback when model files absent; no new Python deps beyond opencv
- Detected labels stored in recording_event.detected_objects (comma-separated)
- Notification messages include object labels when available (e.g. 'Person detected on Front Door')

Continuous motion-gated recording:
- Replace old clip-per-cooldown model with FFmpeg subprocess that lives while
  motion persists + configurable linger window
- Proper SIGTERM/process lifecycle management for clean clip finalisation
- Re-arm gate (motion_cooldown_seconds) prevents rapid restart

Production deployment:
- OPUS_ROLE env var to split API/processor/recorder across separate processes
- go2rtc API/RTSP bind addresses configurable via GO2RTC_API_LISTEN/GO2RTC_RTSP_LISTEN
  for bare-metal security hardening
- .dockerignore cleanup (secrets, runtime data excluded from image layers)
- Docker build --no-cache-dir, NGINX hardening, health sampler improvements

Other:
- Prometheus metrics for motion detection pipeline
- Recording settings UI improvements (default duration display, NAS path hints)
- Motion detection tuning: configurable contrast enhancement, lightning rejection,
  frame-delta accumulation alpha, per-camera motion mask presets
- Auth: session refresh endpoint, go2rtc stream validation on login
- Worker status server: expose recording state (active/since) for frontend
elirtf merged commit d295e51aa9 into master 2026-06-17 15:25:39 +00:00
elirtf deleted branch feat/adaptive-streaming 2026-06-17 15:25:39 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
elirtf/opus!12
No description provided.