How harishwaran25/weapon-detection-yolo works
Sentinel AI is a weapon-detection surveillance system with a browser command center, a FastAPI service, standalone PyTorch detection, and a Raspberry Pi TFLite mode. The main workflow is camera or uploaded media → inference → annotated evidence and incident alerts → operator review and status updates. Separate branches cover metrics, host telemetry, benchmark samples, model training/evaluation, and edge deployment. Backend internals and some dashboard integrations are represented from README claims; those files were not excerpted, so the graph does not infer unshown implementation details.
Main entry points: App.tsx Dashboard app · alert.py Alert manager · server.py FastAPI service · LiveSurveillance.tsx Live surveillance
Components 25
Operations dashboard
- Dashboard app
dashboard/src/App.tsx - Live surveillance
dashboard/src/components/LiveSurveillance.tsx - Threat inspector
dashboard/src/components/ThreatInspector.tsx - Incident command
dashboard/src/components/AlertPanel.tsx - Analytics panel
dashboard/src/components/AnalyticsPanel.tsx - Edge telemetry
dashboard/src/components/EdgeNodePanel.tsx - Dataset panel
dashboard/src/components/DatasetPanel.tsx - Stream canvas
dashboard/src/components/CameraStreamCanvas.tsx - Browser alarm audio
dashboard/src/utils/audio.ts
Detection backend
- FastAPI service
src/server.py - PyTorch detection
src/detect.py
Incident handling
- Alert manager
src/alerting/alert.py - Alert JSON log
outputs/alerts.json - Incident snapshots
outputs
Edge deployment
- TFLite inference loop
src/detect_tflite.py
Model lifecycle
- Dataset configuration
data/data.yaml - Benchmark samples
data/samples - Model evaluation
src/evaluate.py - Custom training
src/train_custom.py - TFLite export
src/export_tflite.py
Other components
- Security operator
- Browser
- Webhook destination
- GPIO buzzer
- Raspberry Pi
Connections 28
- Security operator → Browser: uses
README.md - Browser → Dashboard app: opens
README.md - Dashboard app → Live surveillance: renders
dashboard/src/App.tsx - Dashboard app → Threat inspector: renders
dashboard/src/App.tsx - Dashboard app → Incident command: renders
dashboard/src/App.tsx - Dashboard app → Analytics panel: renders
dashboard/src/App.tsx - Dashboard app → Edge telemetry: renders
dashboard/src/App.tsx - Dashboard app → Dataset panel: renders
dashboard/src/App.tsx - Live surveillance → FastAPI service: streams frames
README.md - Threat inspector → FastAPI service: uploads media
README.md - Dashboard app → FastAPI service: polls alerts
dashboard/src/App.tsx - Incident command → Dashboard app: requests status updates
dashboard/src/components/AlertPanel.tsx - Live surveillance → Stream canvas: displays stream
- Live surveillance → Browser alarm audio: triggers siren
README.md - FastAPI service → PyTorch detection: runs inference
README.md - PyTorch detection → Alert manager: triggers alerts
src/detect.py - FastAPI service → Alert manager: records incidents
README.md - Alert manager → Alert JSON log: appends alerts
src/alerting/alert.py - Alert manager → Incident snapshots: saves evidence
README.md - Alert manager → Webhook destination: notifies
src/alerting/alert.py - Alert manager → GPIO buzzer: activates buzzer
src/alerting/alert.py - Raspberry Pi → TFLite inference loop: runs
README.md - TFLite inference loop → Alert manager: triggers alerts
src/detect_tflite.py - Dataset panel → Benchmark samples: browses samples
README.md - Model evaluation → Dataset configuration: validates against
README.md - Analytics panel → Model evaluation: shows metrics
README.md - Custom training → Dataset configuration: trains on
- TFLite export → TFLite inference loop: produces model for
README.md