How aasimavichavhan/crowd-sentinel works
Crowd Sentinel analyzes video for per-zone person density and motion turbulence, combines those signals into risk tiers, forecasts surges, and streams annotated frames and alerts to a command dashboard. The main runtime path is documented in the README and reflected in the sampled streamer, detector, flow, risk, and visualizer code. Dashboard controls and configuration routes are visible in sampled excerpts; exact wiring for some API and stream details is not fully shown.
Main entry points: video_streamer.py Stream Manager · main.py FastAPI Service · config.py Runtime Configuration · app.js Dashboard Client
Components 14
Video Ingest
- Stream Manager
video_streamer.py
Crowd Analysis
- Person Detection
detector.py - Motion Turbulence
optical_flow.py - Risk Forecasting
risk_engine.py - HUD Overlay
visualizer.py - Runtime Configuration
config.py
Streaming Service
- FastAPI Service
main.py
Command Dashboard
- Dashboard Client
static/app.js - Dashboard Page
static/index.html
Other components
- Venue Operator
- Video Feed
- Threshold Settings
config.yaml - Video Library
sample_videos - Response Teams
Connections 20
- Venue Operator → Dashboard Client: operates
- Video Feed → Stream Manager: supplies frames
- Video Library → Stream Manager: provides clips
- FastAPI Service → Stream Manager: controls playback
- Stream Manager → Person Detection: detects people
- Stream Manager → Motion Turbulence: measures motion
- Stream Manager → Risk Forecasting: evaluates zones
- Stream Manager → HUD Overlay: renders overlay
- Person Detection → Risk Forecasting: zone counts
- Motion Turbulence → Risk Forecasting: zone turbulence
- Runtime Configuration → Person Detection: sets detection options
- Runtime Configuration → Motion Turbulence: sets flow options
- Runtime Configuration → Risk Forecasting: sets thresholds
- Threshold Settings → Runtime Configuration: loads settings
- FastAPI Service → Runtime Configuration: updates presets
- Stream Manager → Dashboard Client: streams frames and telemetry
- Dashboard Page → Dashboard Client: hosts client
- Dashboard Client → FastAPI Service: requests controls
- Venue Operator → FastAPI Service: requests dispatch
- FastAPI Service → Response Teams: reports dispatch intent