How eschouten/ai-detector works
AI Detector watches camera and video-file sources, runs local YOLO object detection, optionally verifies detections with an AI prompt, then exports alerts and media. Its web frontend is described as supporting live-stream monitoring and review of past detections. The manager and webhook exporter excerpts support their specific runtime links; other stage connections reflect the README’s product description, while frontend-to-detector wiring is not established by the sampled source.
Main entry points: detector.py Detection runtime · exporter.py Export dispatch · (admin) Admin interface · sources Source collector
Components 22
Source collection
- Service manager
detector/src/aidetector/detection/manager.py - Source collector
detector/src/aidetector/sources - Stream handling
detector/src/aidetector/sources/streaming.py - Video processing
detector/src/aidetector/media/video.py
Detection and verification
- Detection runtime
detector/src/aidetector/detection/detector.py - YOLO inference
detector/src/aidetector/detection/yolo.py - AI verification
detector/src/aidetector/detection/validator.py
Alert delivery
- Export dispatch
detector/src/aidetector/exporters/exporter.py - Disk exporter
detector/src/aidetector/exporters/disk.py - Telegram exporter
detector/src/aidetector/exporters/telegram.py - Webhook exporter
detector/src/aidetector/exporters/webhook.py
Web monitoring
- Admin interface
web/src/routes/(admin) - Service remotes
web/src/lib/remote - Live preview
web/src/routes/(admin)/streams/[source]/+server.ts - Detection media
web/src/routes/(admin)/detections/[category]/[stage]/[timestamp]/[resource]/+server.ts
Other components
- Operator
- Cameras and files
- YOLO model
- AI service
- Webhook endpoint
- Saved detection files
- FFmpeg
Connections 18
- Operator → Admin interface: uses
- Cameras and files → Source collector: provides video
- Service manager → Detection runtime: starts
- Source collector → Stream handling: handles streams
- Detection runtime → YOLO inference: runs inference
- YOLO inference → YOLO model: uses
- Detection runtime → AI verification: optionally verifies
- AI verification → AI service: asks prompt
- Detection runtime → Export dispatch: exports detections
- Export dispatch → Disk exporter: dispatches
- Export dispatch → Telegram exporter: dispatches
- Export dispatch → Webhook exporter: dispatches
- Webhook exporter → Webhook endpoint: sends request
- Admin interface → Service remotes: requests data
- Admin interface → Live preview: requests preview
- Live preview → FFmpeg: spawns
- Admin interface → Detection media: requests media
- Detection media → Saved detection files: reads files