Crowd Analyzer
Crowd Analyzer is a Python application designed to analyze pedestrian and crowd mobility patterns using computer vision and machine learning techniques. It incorporates YOLO for object detection, Kalman filters for tracking, and various methods for density and speed estimation.
The application also utilizes PedPy to process pedestrian trajectories and LlamaVision 90B via the Groq API for real-time interpretation of PedPy output plots.
🎉 What’s New (April 2025)
We’ve released a major update with enhanced pedestrian and vehicle tracking capabilities:
- Advanced Intersection Analysis: Define custom zones (crosswalks, intersections, sidewalks) for targeted analytics
- Enhanced Visualization: Improved tracking visualization with trajectory mapping and speed indicators
- Vehicle-Pedestrian Interaction: Detection and analysis of interactions between pedestrians and vehicles
- Coordinate Transformation: Advanced homography-based coordinate system calibration
- Expanded Export Features: Save separate trajectory data for pedestrians and vehicles
- Custom Zone Analysis: Monitor and analyze movement within user-defined zones
This functionality is available in the new tracker_pedv.py module. See the updated screenshots below for examples of the new visualization capabilities.
Enhanced pedestrian tracking visualization with PedV (NEW)

Advanced analysis interface with zone definition (NEW)

Features
- Object detection using YOLO
- Kalman filter-based tracking
- Advanced pedestrian and vehicle tracking with trajectory analysis (NEW)
- Zone-based movement analysis for intersections and crosswalks (NEW)
- Vehicle-pedestrian interaction detection and analysis (NEW)
- Density and speed estimation using Voronoi and classic methods
- Interactive point selection for homography transformation
- Graphical user interface (GUI) using PyQt6
- Visualization of trajectories, density, and speed plots using PedPy
- Real-time plot interpretation using LlamaVision AI
Demo
Videos
https://github.com/user-attachments/assets/f16b6d99-86cd-4219-965c-ade446fe8611
https://github.com/user-attachments/assets/72dcb9f9-ba1b-4049-8e87-342af9215d5c
Screenshots
Main application interface

Settings configuration panel

Video processing and tracking visualization

Density, Speed and trajectory analysis plots using Pedpy and LllamaVision

Installation
-
Clone the repository:
git clone https://github.com/yourusername/crowd-analyzer.git
cd crowd-analyzer
-
Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the environment variables:
Usage
-
Run the application:
python CrowdAnalyzer.py
-
Load a video file using the “Load Video” button.
-
Configure settings using the “Settings” button.
-
Start processing the video using the “Start Processing” button.
-
View the results and plots after processing is complete.
File Structure
CrowdAnalyzer.py: Main application file containing the GUI and core functionality.
tracker_ped.py: Contains the basic tracking and density estimation logic.
tracker_pedv.py: NEW - Enhanced tracker with intersection analysis, zone definition, and vehicle-pedestrian interaction detection.
requirements.txt: Lists the required Python packages.
.env: Environment variables file for storing sensitive information like API keys.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
License
This project is licensed under the MIT License.
评论