Skip to content

Crowd Analyzer is a Python application for analyzing pedestrian and crowd mobility patterns using computer vision and machine learning techniques.

Notifications You must be signed in to change notification settings

pozapas/Crowd-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Features

  • Object detection using YOLO
  • Kalman filter-based tracking
  • 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

Sample_1080.mp4
Demo.mp4

Screenshots

Main application interface Main GUI Interface

Settings configuration panel Settings Window

Video processing and tracking visualization Processing View

Density, Speed and trajectory analysis plots using Pedpy and LllamaVision Analysis Results

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/crowd-analyzer.git
    cd crowd-analyzer
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Set up the environment variables:

    • Create a .env file in the project root directory.
    • Add your Groq API key to the .env file:
      GROQ_API_KEY=your_groq_api_key
      

Usage

  1. Run the application:

    python CrowdAnalyzer.py
  2. Load a video file using the "Load Video" button.

  3. Configure settings using the "Settings" button.

  4. Start processing the video using the "Start Processing" button.

  5. View the results and plots after processing is complete.

File Structure

  • CrowdAnalyzer.py: Main application file containing the GUI and core functionality.
  • Tracker.py: Contains the tracking and density estimation logic.
  • 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.

About

Crowd Analyzer is a Python application for analyzing pedestrian and crowd mobility patterns using computer vision and machine learning techniques.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages