Skip to content

MediaTrex/Codorra_2026_Hackathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

139 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CrowdGuard: Privacy-Preserving Crowd Density Estimator

Smart AI-Powered Monitoring for Safer Public Spaces
Mass Surveillance vs Public Safety Hackathon | 48-Hour Build

Project Banner

Monitor Density.Preserve Dignity

Python FastAPI React

Team Title

MetriX
[ Privacy-First AI Innovators ]

Contributors

  • ROSHAN PATEL - Backend Integration & Team Lead
  • NABIHG NOORUL ASHIKA B - System Design & Research
  • NITHEESH S - Frontend Design & Integration
  • VIPUL RAJ SHAH - AI/ML Intergration

Project Screenshots

CrowdGuard - Complete UI Overview

Login
1. Login
Dashboard
2. Dashboard
Live Monitoring
3. Live Monitoring
Heatmap
4. Heatmap
Analytics
5. Analytics
Alerts
6. Alerts
Reports
7. Reports
Settings
8. Settings

Privacy-Preserving AI-Powered Crowd Monitoring System


Problem Statement & Research Insights

The Challenge:

Modern smart cities face a critical tension β€” mass surveillance for public safety versus citizen privacy. Traditional crowd monitoring systems often rely on facial recognition, identity tracking, and centralized raw video storage, leading to:

  • Privacy Erosion: Constant tracking raises concerns about mass surveillance, data breaches, and misuse (e.g., mission creep beyond safety).
  • Public Safety Risks: Overcrowding in public spaces (events, transit hubs, markets) can lead to stampedes, chaos, or emergencies. Studies show real-time density monitoring can prevent disasters.
  • Bias & Inefficiency: Systems trained on biased data over-police certain areas; raw footage storage increases breach risks.

Global Context (2025-2026):

  • Cities worldwide (Singapore, Ahmedabad, New York) deploy AI crowd systems for safety, yet privacy regulations like GDPR and growing public distrust demand Privacy-by-Design.
  • Research highlights the need for edge processing, anonymization, and density estimation without PII (Personally Identifiable Information). Our Solution Addresses This Head-On: A privacy-first system that delivers actionable safety insights without compromising individual rights.

Solution Approach

CrowdGuard uses anonymous computer vision to estimate crowd density, detect overcrowding risks, generate heatmaps, and send real-time alerts β€” all while ensuring zero facial recognition and no identity tracking. It addresses the challenge of monitoring and managing large crowds in public spaces while protecting individual privacy. Traditional surveillance systems often rely on facial recognition and identity tracking, which can raise serious privacy and ethical concerns. Our solution uses AI-powered computer vision to estimate crowd density, detect overcrowding, and generate real-time safety alerts without identifying or storing any personal information. By automatically counting people, analyzing crowd distribution, and visualizing density through dashboards and heatmaps, the system helps authorities make informed decisions to prevent congestion, improve public safety, and respond quickly to potential risks. At the same time, privacy-preserving techniques such as face blurring and anonymous analytics ensure that citizens' identities remain protected, creating a balance between public safety and personal privacy.

Key Differentiators:

  • Privacy-First: Processes data at the edge; only aggregated, anonymized metrics are stored/transmitted.
  • Real-Time & Actionable: Heatmaps + alerts for unsafe conditions.
  • Ethical AI: Fully auditable, transparent, and compliant with privacy best practices.
  • Scalable Smart-City Architecture: Designed to support multiple camera feeds across malls, stadiums, metro stations, airports, and other public spaces from a centralized dashboard.
  • Low-Cost Deployment: Leverages existing CCTV infrastructure and lightweight AI models, reducing implementation costs for cities and organizations.
  • Predictive Safety Insights: Analyzes historical crowd patterns to identify peak hours and potential overcrowding risks before they become critical situations.

Project Demo

UI Walkthrough

Live Demo

CrowdGuard Demo Video link


Tech Stack & Reasoning

Component Technology Why We Chose It
Backend FastAPI Excellent AI integration, native async support, built-in Swagger docs, Python ecosystem, and fastest hackathon development speed. Superior to Express for AI-heavy workloads.
Frontend ReactJS Fast, component-based UI for interactive dashboards, heatmaps, and real-time updates.
Database MongoDB Flexible schema for storing anonymized analytics, heatmaps, and alerts. Perfect for FARM stack scalability.
AI Engine YOLO (v8+) + OpenCV State-of-the-art real-time object detection for people counting/density. Lightweight, accurate, and runs efficiently on edge devices.
Heatmaps & Analytics OpenCV + Matplotlib/Seaborn Fast generation of visual insights from anonymized data.
Deployment Docker (recommended) Easy reproducibility and scalability.

Why this stack? It aligns perfectly with your architecture decision β€” AI-heavy, rapid prototyping in 48 hours, and production-ready.


System Architecture & Data Flow

flowchart LR
    Cam[πŸ“Ή Public Camera / Webcam] 
    
    subgraph Edge["Edge Layer (Privacy-Preserving)"]
        YOLO[YOLOv8 + OpenCV<br/>Object Detection]
        PP[Privacy Processor<br/>Anonymization + Density Calc]
    end
    
    subgraph Processing["Processing Layer"]
        Density[Crowd Density Engine]
        Heat[Heatmap Generator]
        Alert[Overcrowding Alert System]
    end
    
    subgraph Backend["Backend"]
        API[FastAPI API]
        DB[(MongoDB<br/>Anonymized Analytics)]
    end
    
    subgraph Frontend["Frontend"]
        Dash[React Dashboard]
        Viz[Interactive Heatmaps + Alerts]
    end

    Cam --> YOLO
    YOLO --> PP
    PP --> Density
    Density --> Heat
    Density --> Alert
    Heat --> API
    Alert --> API
    API <--> DB
    API --> Dash
    Dash --> Viz

    classDef privacy fill:#10b981,stroke:#047857,color:white,rx:15,ry:15
    class PP privacy

Loading

Overview:

graph TD
    A[AI Engine] -->|Sends data| B[Backend API]
    B -->|Stores data| C[MongoDB]
    B -->|Provides data| D[React Dashboard]
    E[Video Processing] -->|Sends analytics| B
Loading

Workflow:

  1. Video stream processed locally/on-edge.
  2. YOLO detects people β†’ count & density calculated (no identities).
  3. Heatmap generated and alerts triggered if thresholds exceeded.
  4. Anonymized data saved β†’ visualized on dashboard.

API Guide & Documentation

API Guide Links:

Setup APIs Guide
AI Engine API Guide
Backend APIs Guide

Documention Links:

Project Architecture Documentation
Frontend Documentation
AI Engine Documentation
AI Engine Quickstart

Key Features & Innovation

MUST-HAVE MVP Features:

  • Real-time Crowd Density Detection
  • Overcrowding Risk Alerts
  • Privacy-Preserving Heatmaps
  • Anonymous Analytics Dashboard

Innovation Highlights:

  • Zero Identity Tracking β€” Strong differentiator vs. traditional surveillance.
  • Edge-First Processing β€” Minimizes data centralization risks.
  • Ethical Transparency β€” Built-in audit logs and privacy metrics.

Future Scope & Scalability

  • Multi-camera support with Federated Learning.
  • Integration with IoT sensors and smart city platforms.
  • Mobile app for authorities/citizens (privacy-controlled views).
  • Advanced anomaly detection (e.g., panic movement patterns).
  • Cloud/On-Prem deployment options for global cities.

Potential Impact: Deployable in malls, stadiums, transit hubs, and festivals worldwide β€” balancing safety and civil liberties.


Conclusion

CrowdGuard proves that public safety and privacy can coexist. By using edge AI and privacy-by-design, we built a system that protects lives in crowded spaces without enabling mass surveillance. A balanced, ethical solution for modern smart cities.

About

CrowdGuard: Privacy-Preserving Crowd Density Estimator [Smart AI-Powered Monitoring for Safer Public Spaces ]

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors