How prathap2349/smart-vision works
Smart Vision Sentry is a local edge-AI CCTV security system: it captures camera frames, detects and tracks people in protected zones, checks resident identity, and alerts on verified threats. Operators manage cameras, zones, residents, alerts, and system status through the web dashboard. The README documents the detection stages; source-index references support the backend orchestration and major frontend/API connections. Some route and integration internals were not excerpted, so those relationships are shown only where documented or indexed.
Main entry points: App.tsx Dashboard routing · main.py FastAPI application · detection_loop.py Detection loop · database.py SQLite data
Components 30
Capture and Detection
- RTSP capture
backend/camera/rtsp_stream.py - Person detector
backend/ai/detector.py - Detection loop
backend/detection_loop.py
Tracking and Decisions
- IoU tracking
backend/tracking/tracker.py - Zone checks
backend/tracking/zone_checker.py - Face recognition
backend/face/recognizer.py - Resident cache
backend/face/cache.py - Triple-gate engine
backend/ai/decision_engine.py
Security Operations
- Alert dispatch
backend/alerts/alert_manager.py
API and Persistence
- FastAPI application
backend/main.py - SQLite data
backend/database.py - Resident enrollment
backend/api/people.py - Camera management
backend/api/cameras.py - Alert and history APIs
backend/api/alerts.py - Analytics API
backend/api/analytics.py - Health API
backend/api/health.py
Operator Dashboard
- Dashboard routing
src/App.tsx - Security state
src/context/SecurityContext.tsx - API client
src/services/api.ts - Security overview
src/pages/OverviewPage.tsx - Alerts view
src/pages/AlertsPage.tsx - People view
src/pages/PeoplePage.tsx - Camera view
src/pages/CamerasPage.tsx - Live monitor
src/pages/LiveMonitorPage.tsx - Zone editor
src/pages/DetectionZonesPage.tsx - Analytics view
src/pages/AnalyticsPage.tsx - System health
src/pages/SystemHealthPage.tsx
Other components
- RTSP camera
- Telegram
- Security operator
Connections 40
- RTSP camera → RTSP capture: sends frames
- RTSP capture → Detection loop: supplies frames
backend/detection_loop.py - Detection loop → Person detector: detects people
backend/detection_loop.py - Detection loop → IoU tracking: updates tracks
backend/detection_loop.py - IoU tracking → Zone checks: checks zones
backend/tracking/tracker.py - Detection loop → Face recognition: verifies faces
backend/detection_loop.py - Face recognition → Resident cache: matches residents
backend/face/recognizer.py - Resident cache → SQLite data: loads embeddings
backend/face/cache.py - Detection loop → Triple-gate engine: evaluates gates
backend/detection_loop.py - Triple-gate engine → Alert dispatch: flags threats
- Detection loop → Alert dispatch: dispatches alerts
backend/detection_loop.py - Alert dispatch → SQLite data: records alerts
backend/alerts/alert_manager.py - Alert dispatch → Telegram: notifies
- FastAPI application → Detection loop: starts processing
backend/main.py - FastAPI application → Camera management: registers routes
backend/main.py - FastAPI application → Alert and history APIs: registers routes
backend/main.py - FastAPI application → Resident enrollment: registers routes
backend/main.py - FastAPI application → Analytics API: registers routes
backend/main.py - FastAPI application → Health API: registers routes
backend/main.py - Resident enrollment → SQLite data: stores enrollments
backend/api/people.py - Resident enrollment → Face recognition: validates faces
backend/api/people.py - Camera management → SQLite data: manages cameras
backend/api/cameras.py - Alert and history APIs → SQLite data: reads alerts
backend/api/alerts.py - Analytics API → SQLite data: reads events
backend/api/analytics.py - Health API → SQLite data: checks storage
backend/api/health.py - Security operator → Dashboard routing: uses dashboard
- Dashboard routing → Security overview: routes to
src/App.tsx - Dashboard routing → Live monitor: routes to
src/App.tsx - Dashboard routing → Alerts view: routes to
src/App.tsx - Dashboard routing → People view: routes to
src/App.tsx - Dashboard routing → Camera view: routes to
src/App.tsx - Dashboard routing → Zone editor: routes to
src/App.tsx - Dashboard routing → Analytics view: routes to
src/App.tsx - Dashboard routing → System health: routes to
src/App.tsx - Security overview → Security state: reads state
src/pages/OverviewPage.tsx - Alerts view → Security state: reads state
src/pages/AlertsPage.tsx - People view → Security state: reads state
src/pages/PeoplePage.tsx - Camera view → Security state: reads state
src/pages/CamerasPage.tsx - Security state → API client: requests data
src/context/SecurityContext.tsx - API client → FastAPI application: calls backend