SafeFlow
Smooth Movement, Safer Spaces.
The problem SafeFlow solves
Unmonitored crowd surges at large gatherings often lead to stampedes, injuries, and fatalities—SafeFlow uses AI-powered video analysis to predict and prevent such disasters in real time.
Challenges we ran into
Model Integration Issues
Hurdle: Initially, integrating YOLOv8 for detection and CSRNet for density estimation was tricky because they used different input/output formats.
Solution: I wrote a preprocessing pipeline to unify the outputs—YOLO bounding boxes were converted into coordinate maps that CSRNet could process for density heatmaps.
Performance Bottlenecks
Hurdle: Real-time video streams lagged when both models ran simultaneously.
Solution: I optimized inference by using GPU acceleration, batch processing, and frame skipping for smoother live feeds without losing accuracy.
Risk Classification Logic
Hurdle: Translating raw density values into meaningful risk levels (LOW / MEDIUM / HIGH) was challenging because different environments had different crowd patterns.
Solution: I experimented with thresholds, tested on sample crowd videos, and finally designed a rule-based + statistical hybrid approach for more reliable classification.
