Skip to content

Crowd Control Dashboard uses YOLO for real-time crowd analysis from video uploads, providing insights to assist in crowd management.

Notifications You must be signed in to change notification settings

NadaQQ/CV-Crowd-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ذَروة (Peak)

Project Logo

Overview

a computer vision project that provides a real-time crowd control analysis dashboard utilizing the YOLOv8-seg model for object detection. The system tracks people’s movement and analyzes crowd density, speed, and occupancy metrics from uploaded videos SAHI (Slicing Aided Hyper Inference) model was used to optimize inference results, ensuring improved detection accuracy and efficiency.

Key Features

  • Object Detection: Utilizes the YOLOv8-seg model to detect people in video frames.
  • Speed Calculation: Tracks the movement of individuals and calculates their speed.
  • Hexbin Density Plot: Displays the density of people in the frame as a hexbin plot.
  • Real-time Alerts: Triggers alerts if the density or speed exceeds user-defined thresholds.
  • Real-time Charts: Includes visualizations for crowd density, rate of change in density, and occupancy over time.
  • Crowd Count: Real-time calculation of the number of people in each frame.
  • Occupancy Percentage: Calculates the percentage of the frame occupied by people.

Installation

  1. Clone this repository:

    git clone https://github.com/NadaQQ/CV-Crowd-Management.git
  2. Install the required dependencies

     pip install -r requirements.txt
  3. Ensure you have a YOLO model weights file (best80.pt).

  4. Run the Streamlit app:

    streamlit run crowd-control-dashboard.py

Dependencies

This project requires the following dependencies:

  • ultralytics: YOLO model for object detection
  • streamlit: Framework for building the dashboard
  • opencv-python: For video processing
  • plotly: For creating interactive plots
  • matplotlib: For hexbin plots
  • scipy: For calculating the Euclidean distance in speed analysis
  • numpy: For numerical operations
  • SAHI: SAHI model to optimize inference results

How to Use

  1. Upload a video file via the dashboard.
  2. Adjust the density and speed thresholds using the sidebar.
  3. View real-time crowd analysis.

Inference Results

Before

Before

After

After

About

Crowd Control Dashboard uses YOLO for real-time crowd analysis from video uploads, providing insights to assist in crowd management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages