๐ง What is this?
CrowdSense AI is a real-time crowd safety monitoring dashboard that simulates how AI analyses live CCTV footage at large public venues โ railway stations, stadiums, and festivals โ to detect dangerous crowd conditions before they become stampedes. In a live deployment, this connects to YOLOv8 running on GPU servers, processing 30fps video with ~190ms end-to-end latency.
๐ Live Metrics Bar (top row)
๐ฅ
People Detected
Total individuals detected across all camera zones using YOLOv8 object detection. The ยฑmargin shows model uncertainty. Updates every 3 frames.
๐
Avg Density (p/mยฒ)
Below 2 = comfortable. 4โ5 = slow and uncomfortable. Above 6 = dangerous โ the threshold where crush injuries become likely.
๐จ
Flow Speed (m/s)
Crowd movement speed via optical flow algorithms. Normal walk = 0.8โ1.4 m/s. Spike above 2+ = surge or panic. Near zero with high density = bottleneck.
๐ก
Panic Index (%)
AI composite score of directional chaos + speed variance + density. Under 30% = safe. 60โ80% = alert. Above 80% = evacuate immediately.
๐จ
Active Alerts
Count of unresolved alerts in the last 5 minutes. Changes with the simulation scenario you select from the sidebar or Controls tab.
๐ก Density Heatmap
๐ขโ๐ด
Colour Scale
Green = safe. Amber = caution. Red = critical crush risk. The gradient updates every animation frame from live model output.
โถ
Direction Arrows
White arrows show dominant crowd flow direction per zone via optical flow vectors. Chaotic arrows = panic. Arrows converging on a red zone = crush danger.
๐บ
Zone Labels (AโE)
The heatmap is overlaid on a scaled venue floor plan. Each zone maps to a physical area. Gate markers show key entry/exit points.
๐ Zone Risk Levels
Each of the 5 zones gets a real-time risk score (0โ100%) calculated from local density, flow speed, and panic index. Colour bars and badges (LOW / MOD / CRIT) update live. When a zone hits CRIT, the system triggers an alert and notifies all connected authority channels automatically.
๐น Camera Feeds
๐ด
Live Thumbnails
4 simulated CCTV feeds with animated crowd figures. Status dot colour (green/amber/red) reflects that zone's panic level. Blinking red border = alert condition.
โคข
Tap to Expand
Click or tap any camera to open a large expanded view with perspective crowd rendering, AI bounding boxes (P01, P02โฆ) around each person, and live stats.
๐ฒ
AI Bounding Boxes
In expanded view, red boxes = people in danger zones, cyan boxes = safe zones. Each person gets a tracked ID, mirroring real YOLOv8 detection output.
โก Right Panel (desktop) / Alerts Tab (mobile)
๐
Panic Arc Meter
Semicircular gauge showing venue-wide panic index. Fills green โ amber โ red. Animates smoothly with every AI update.
๐
30-Second Trend
Sparkline chart showing panic index over the last 30 seconds. See if the situation is improving or escalating, not just the current snapshot.
๐จ
Alert Feed
Colour-coded by severity: red border = critical (dispatch now), amber = warning, cyan = informational. Alerts are stable โ they do not flicker or blink.
๐ฎ Simulation Scenarios
๐ข
Normal flow
Baseline crowd movement. Density ~2.1 p/mยฒ, panic 12%. All zones green. Shows what the system looks like when everything is safe.
๐ก
Directional surge
Sudden rush in one direction โ e.g. a train arrives. Density spikes to 4.3, flow speed 2.4 m/s, panic 47%. Zone D goes critical.
๐ด
Panic event
Full crowd panic โ chaotic movement, density 6.9 p/mยฒ, panic 89%. All cameras alert. Cascade risk and PA notifications trigger.
๐
Bottleneck
Exit congestion โ flow speed 0.3 m/s (near stopped) with high density. The most dangerous passive scenario โ crushing with barely any movement.
๐ฑ Mobile Layout
On phones and tablets, the dashboard switches to a tab-based layout. Use the nav bar at the top to switch between:
๐
Dashboard tab
Shows the heatmap + zone risk levels โ the two most critical views for rapid assessment.
๐ก
Heatmap tab
Full-width density heatmap with colour legend and direction arrows.
๐น
Cameras tab
All 4 camera feeds. Tap any to open the full expanded modal view.
๐จ
Alerts tab
Alert feed, 30s panic trend chart, and authority channel status.
โ๏ธ
Controls tab
Scenario selector, AI sensitivity slider, response action buttons.