How sarfarazahemad9205/crowdshield-ai works
StampedeGuard AI accepts a crowd video, tracks people and movement, then assesses tracking reliability and movement risk for display in the web dashboard. The live path is supported by the sampled frontend, API, video-processing, and risk-engine excerpts. The tree also shows separate dataset/training-video processing and offline feature-analysis code; their internal wiring is not established by the excerpts, so those branches are kept limited. No README content was provided.
Main entry points: main.py Backend API · live_risk_engine.py Live risk engine · feature_extraction.py Feature extraction · video_processor.py Video processor
Components 20
Dashboard and API
- Dashboard
frontend/src/App.jsx - API client
frontend/src/services/api.js
Video tracking
- Backend API
backend/app/main.py - Video processor
backend/app/video_processor.py - Tracking CSV
- Annotated video
Live risk analysis
- Live risk engine
backend/ml/inference/live_risk_engine.py - Tracking checks
backend/ml/features/tracking_cleaning.py - Time windows
backend/ml/analysis/create_time_windows.py - Behavior features
backend/ml/analysis/behavioral_features.py - Risk assessment
Dataset analysis
- Dataset video processing
backend/app/process_dataset_videos.py - Training video processing
backend/app/process_training_videos.py - Feature extraction
backend/ml/feature_extraction.py - Basic features
backend/ml/features/basic_features.py - Temporal features
backend/ml/features/temporal_features.py - Directional features
backend/ml/features/directional_features.py - Training analysis
backend/ml/analysis
Other components
- Video analyst
- YOLO tracker
Connections 19
- Video analyst → Dashboard: selects video
- Dashboard → API client: uploads and processes
- API client → Backend API: HTTP requests
- Backend API → Video processor: processes video
- Video processor → YOLO tracker: tracks people
- Video processor → Tracking CSV: writes tracks
- Video processor → Annotated video: writes video
- Backend API → Tracking CSV: reads tracking data
- Backend API → Live risk engine: analyzes tracks
- Live risk engine → Tracking checks: checks anomalies
- Live risk engine → Time windows: creates windows
- Live risk engine → Behavior features: calculates features
- Live risk engine → Risk assessment: produces risk
- Backend API → API client: returns result
- API client → Dashboard: returns analysis
- Feature extraction → Tracking checks: checks anomalies
- Feature extraction → Basic features: calculates features
- Feature extraction → Temporal features: calculates features
- Feature extraction → Directional features: calculates features