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.
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)

- 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
Sample_1080.mp4
Demo.mp4
Video processing and tracking visualization

Density, Speed and trajectory analysis plots using Pedpy and LllamaVision

-
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:
- Create a
.envfile in the project root directory. - Add your Groq API key to the
.envfile:GROQ_API_KEY=your_groq_api_key
- Create a
-
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.
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.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.


