How danish-m-qureshi/ai-surveillance-drone works
This is a local-first Raspberry Pi camera application with CLI workflows for diagnostics, still capture, motion monitoring, and YOLO object detection on images or live frames. The CLI owns capture and processing calls, writes annotated images and event summaries, and uses reusable camera, motion, and detection modules. The detector’s preprocessing, ONNX inference, and result parsing are distinct internal stages. README capabilities not evidenced in sampled implementation are shown only where documented; relationships are limited to the excerpts and README.
Main entry points: surveillance.py Command entry · detection.py ONNX detector · camera.py Camera lifecycle · artifacts Generated artifacts
Components 18
CLI workflows
- Command entry
surveillance.py - Camera diagnostics
surveillance.py - Still capture
surveillance.py - Motion monitor
surveillance.py - Image detection
surveillance.py - Live detection
surveillance.py
Camera lifecycle
- Camera lifecycle
ai_surveillance/camera.py
Motion analysis
- Motion analysis
ai_surveillance/motion.py - Motion annotation
ai_surveillance/motion.py
AI detection
- ONNX detector
ai_surveillance/detection.py - Frame preprocessing
ai_surveillance/detection.py - Detection parsing
ai_surveillance/detection.py - Detection annotation
ai_surveillance/detection.py - YOLO model
models
Local results
- Generated artifacts
artifacts
Other components
- Operator
- Pi camera
- ONNX Runtime
Connections 25
- Operator → Command entry: runs command
README.md - Command entry → Camera diagnostics: dispatches
surveillance.py - Command entry → Still capture: dispatches
surveillance.py - Command entry → Motion monitor: dispatches
surveillance.py - Command entry → Image detection: dispatches
surveillance.py - Command entry → Live detection: dispatches
surveillance.py - Camera diagnostics → Camera lifecycle: discovers cameras
surveillance.py - Still capture → Camera lifecycle: opens camera
surveillance.py - Motion monitor → Camera lifecycle: opens camera
surveillance.py - Live detection → Camera lifecycle: opens camera
surveillance.py - Camera lifecycle → Pi camera: controls camera
ai_surveillance/camera.py - Motion monitor → Motion analysis: analyzes frames
surveillance.py - Motion monitor → Motion annotation: annotates result
surveillance.py - Image detection → ONNX detector: detects objects
surveillance.py - Live detection → ONNX detector: detects objects
surveillance.py - ONNX detector → Frame preprocessing: prepares frame
ai_surveillance/detection.py - ONNX detector → ONNX Runtime: runs inference
ai_surveillance/detection.py - ONNX detector → Detection parsing: parses output
ai_surveillance/detection.py - ONNX detector → YOLO model: loads model
ai_surveillance/detection.py - Image detection → Detection annotation: annotates result
surveillance.py - Live detection → Detection annotation: annotates result
surveillance.py - Still capture → Generated artifacts: writes capture
surveillance.py - Motion monitor → Generated artifacts: writes evidence
surveillance.py - Image detection → Generated artifacts: writes annotated image
surveillance.py - Live detection → Generated artifacts: writes events and images
surveillance.py