Project Info
Inspiration
Crowd crush incidents at concerts, festivals, and public events have spiked post-pandemic. Crowd crush incidents, such as the Astroworld concert incident in 2021, as well as the Itaewon Halloween crowd crush in 2022, both had warning signs visible on security camera footage, but when the emergency was called, many had already been injured or harmed. In these incidents security was present but the crowd density increased rapidly causing the incidents. Every public event with large crowds risks crowd crushes and requires security personnel to be watching the crowd and keeping track of overflow and capacity. As a result, I created a lightweight dashboard tool that watches the security feed as well as live videos of crowds to provide security live updates.
What it does
CrowdSense is a browser-based crowd risk dashboard that works off a webcam or an uploaded video clip: Tracks four different risk signals which include headcount, density, motion energy, and 10-second crowd surges, and combines these factors into a 0-100 risk score, weighted to give an emphasis on density and motion Detects people in the frame in real time using a tiled scanning of the frame in overlapping zoomed sections to catch people that are further away or covered by other people Has an aerial mode The aerial mode estimates headcount by measuring how much of the frame is "crowd-textured" versus open ground, calibrated against an on-screen reference circle, the same area-based approach used in real safety guidance for very dense crowds. Speaks alerts out loud using Deepgram's Aura voice agent, so any security or user utilizing CrowdSense attention is immediately directed to the urgency of the situation for quick preventative action.
How we built it
Frontend: HTML/CSS/JS, TensorFlow.js running COCO-SSD client-side for person detection, Chart.js for the live risk timeline, and a custom canvas-based pixel-variance algorithm for the aerial estimator. Backend: a small Node.js/Express server that proxies Deepgram's /v1/speak endpoint for voice alerts, so the API key never has to live in browser JavaScript. No video or images ever leave the browser. Only short alert text is sent to Deepgram for speech synthesis.
Challenges we ran into
The biggest challenge was that the first version of the dashboard struggled to identify a correct headcount and kept reporting "1 person" on a frame, although there were several hundred, and completely failed on real aerial/drone crowd footage. Debugging that meant pulling the actual frames from our test video and realizing the failure was because the object detector was trained on eye-level photos and wasn't seeing people's faces above. We fixed this by Accomplishments we're proud of Built and validated a custom area crowd-density estimator from scratch, and verified it against real aerial footage before shipping it. Got a full real-time pipeline working client-side entirely with detection, density, motion, and surge, which feeds a live risk score and voice alerts.
What we learned
General-purpose object detectors carry strong assumptions about camera angle that aren't obvious until you test them outside that assumption, for example, aerial drone shots. Voice alerts change how a monitoring tool actually gets used. A number changing on a screen is easy to miss, while a voice alert helps grab your attention immediately, along with a risk score. Weighting crowd risk by density and other factors is important to efficiently identify the risk of crowd crush while also not underestimating or overestimating the numbers.
What's next
Integrate an AI agent so security can ask for situational assessments and recommended action on demand, instead of just updates on a dashboard. Swap the area-based aerial estimator for a proper crowd-counting density mode for real per-frame head counts instead of an area estimate. Multiple-angle video support with a single risk dashboard across a whole venue, so an operator can see which entrance or section is vulnerable to the risk of crowd crush. On-device deployment for venues without reliable internet, since the detection pipeline already runs fully client-side.
This repository has no readme, or GitHub could not be reached.
Analysis
View
Metric
No commits on this project resolved to a GitHub account.
Technology
- CSSIn code
- ExpressIn code
- HTMLIn code
- JavaScriptIn code
- Node.jsClaimed
4 of 5 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
62 KB
Source files
5
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
HebaJeba/securityscan
8 files · 64 KB · @ f1679a0
Structure
Application logic
1 file · 13%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- JavaScript62%
- Markdown16%
- CSS12%
- HTML10%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
crowd-risk-monitor (6)/crowd-risk-monitor/package.json
npm · 3- dotenv
- express
- ws
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
Aerial mode area-based headcount estimatorVerified
Aerial mode estimates headcount from crowd-textured area vs open ground, calibrated against an on-screen reference circle
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:344— computeAerialEstimate() computes per-block pixel-intensity stddev to classify 'crowd-textured' blocks and converts textured area to estimated headcount using headSizePercent calibrationcrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:160— updateCalibrationCircle() sizes the on-screen calibrationCircle used to calibrate head size
Chart.js live risk timelineVerified
Chart.js for the live risk timeline
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:95— new Chart(...) with a line dataset updated every tick in updateRiskUI()
Deepgram Aura voice alertsVerified
Speaks alerts out loud using Deepgram's Aura voice agent when risk escalates
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:554— maybeAlert() triggers speak(message) on risk escalation, which POSTs to /api/speakcrowd-risk-monitor (6)/crowd-risk-monitor/server.js:66— /api/speak proxies text to Deepgram's /v1/speak Aura TTS endpoint using DEEPGRAM_API_KEY server-side
Four risk signals combined into 0-100 weighted risk scoreVerified
Tracks headcount, density, motion energy, and 10-second crowd surges, combined into a 0-100 risk score weighted toward density and motion
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:294— countHistory tracks a 10s rolling window to compute surgecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:312— riskScore = countScore*0.15 + densityScore*0.35 + surgeScore*0.25 + motionScore*0.25, matching the claimed density/motion-weighted 0-100 score
Live webcam / uploaded video crowd dashboardVerified
Browser-based crowd risk dashboard that works off a webcam or an uploaded video clip
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:193— useWebcam() calls getUserMedia and attaches the stream to the video elementcrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:207— useFile() loads an uploaded video file via URL.createObjectURL into the video element
No video/images leave the browser; only alert text sent to DeepgramVerified
No video or images ever leave the browser. Only short alert text is sent to Deepgram for speech synthesis
Claimed on Devpostmedium confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:609— speak() sends only { text } to /api/speak; video/canvas frames are never posted anywhere in app.jscrowd-risk-monitor (6)/crowd-risk-monitor/server.js:44— /api/telemetry only accepts numeric metrics JSON, not frames/images
Node.js/Express server proxying Deepgram so API key never reaches the browserVerified
Backend: a small Node.js/Express server that proxies Deepgram's /v1/speak endpoint for voice alerts, so the API key never has to live in browser JavaScript
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/server.js:19— DEEPGRAM_API_KEY is read from process.env server-side onlycrowd-risk-monitor (6)/crowd-risk-monitor/server.js:53— /api/speak endpoint attaches the key server-side when calling Deepgram
TensorFlow.js COCO-SSD client-side person detectionVerified
TensorFlow.js running COCO-SSD client-side for person detection
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/index.html:151— loads tfjs and coco-ssd from CDNcrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:129— cocoSsd.load() and model.detect() used for person detection
Tiled zoomed-in person detectionVerified
Detects people using tiled scanning of the frame in overlapping zoomed sections to catch distant or occluded people
Claimed on Devposthigh confidencecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:410— tiledDetect() splits the frame into TILE_COLS x TILE_ROWS overlapping tiles (TILE_OVERLAP), zooms each into tileCanvas, and runs model.detect per tilecrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:457— mergeOverlappingBoxes/iou merges duplicate detections across overlapping tiles
AI agent for situational assessments / recommended actions on demand (voice agent Q&A)Code-supported
Speaks alerts via a voice agent; What's next section separately proposes an AI agent for situational assessments 'instead of just updates on a dashboard'
Claimed on Devpostmedium confidencecrowd-risk-monitor (6)/crowd-risk-monitor/server.js:108— A live two-way Deepgram Voice Agent WebSocket relay exists with a get_crowd_metrics function so the agent can answer questions like risk level or density on demandcrowd-risk-monitor (6)/crowd-risk-monitor/public/app.js:651— toggleVoiceAgent()/startVoiceAgent() wires the mic to this relay for live conversation
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.