Skip to content

realvoidgojo/VideoAnalytics-Cyberthon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Video Analytics and OSINT Platform

Video Analytics Object Detection Heatmap Analysis React Flask

A comprehensive video analytics platform with real-time object detection, movement heatmap analysis, and object tracking capabilities. Powered by YOLO models for detection, with a React frontend and Flask+Celery backend.

✨ Features

  • πŸ“Š Real-time Object Detection: Process videos and detect objects using latest YOLO models
  • πŸ”₯ Heatmap Analysis: Generate motion heatmaps to visualize movement patterns over time
  • πŸ“ˆ Statistical Analysis: Visualize detected object frequencies and detailed statistics
  • πŸ”„ Object Tracking: Track objects across video frames with persistence
  • ⚑ Multiple Video Processing: Process multiple videos simultaneously with intuitive job management
  • πŸ› οΈ Customizable Parameters: Adjust frame intervals and model selection for optimal results
  • πŸ“± Responsive UI: Modern interface that works across devices
v2.mp4

πŸ› οΈ Prerequisites

Before getting started, ensure you have installed:

πŸš€ Optional: GPU Acceleration

For significantly faster processing:

🧱 Installation

1. Clone the Repository

git clone https://github.com/realvoidgojo/VideoAnaltyics-Cyberthon.git
cd VideoAnaltyics-Cyberthon

⚠️ Important: Download YOLO models manually from:

2. Set Up Conda Environment (Recommended)

conda create -n video_env python=3.10 -y
conda activate video_env
conda install -c conda-forge opencv ffmpeg -y
conda install -c conda-forge ffmpeg=6.1.1=gpl* -y

3. Backend Setup

# With conda environment activated:
pip install -r requirements.txt

# For CUDA support (optional, replace cu116 with your CUDA version):
pip uninstall torch torchvision -y
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

# Create necessary directories
mkdir -p data hls_stream

4. Frontend Setup

cd frontend
npm install

▢️ Running the Application

1. Start Redis Server

# Windows: Start from the installed location
# Linux/macOS:
redis-server

2. Start Celery Worker

# From project root, in a new terminal:
conda activate video_env  # If using conda
celery -A src.celery.celery_app worker --loglevel=info --pool=threads -c 4

Adjust -c option to match your CPU cores

3. Start Flask Backend

# From project root, in a new terminal:
conda activate video_env  # If using conda
python app.py

Flask will run at: http://127.0.0.1:5000

4. Start React Frontend

# From frontend directory, in a new terminal:
npm run dev

Frontend will be available at: http://localhost:5173

πŸ–₯️ Using the Application

  1. Upload Videos: Use the upload interface to submit video files
  2. Choose Detection Settings:
    • Select YOLO model (smaller models are faster)
    • Set frame interval (higher values = faster processing, fewer detections)
    • Enable heatmap generation
  3. Analysis Modes:
    • Object Detection View: See detected objects with bounding boxes and statistics
    • Heatmap Analysis: Visualize movement intensity and patterns over time

🌟 Features in Detail

Object Detection

  • Real-time object recognition with latest YOLO models
  • Customizable confidence thresholds
  • Detailed statistics of detected objects
  • Frequency charts and object counts
  • HLS video streaming for smooth playback

Heatmap Analysis

  • Movement intensity visualization
  • Temporal activity mapping
  • Peak movement time identification
  • Duration analysis
  • Downloadable heatmap videos

πŸ“ Project Structure

VideoAnalytics-Cyberthon/
β”œβ”€β”€ app.py                   # Main Flask application
β”œβ”€β”€ src/                     # Source code directory
β”‚   β”œβ”€β”€ celery.py            # Celery application definition
β”‚   β”œβ”€β”€ video_processing.py  # Frame extraction and preprocessing
β”‚   β”œβ”€β”€ object_detection.py  # YOLO detection functions
β”‚   β”œβ”€β”€ heatmap_analysis.py  # Heatmap generation and analysis
β”‚   └── ...
β”œβ”€β”€ models/                  # YOLO model files (.pt)
β”œβ”€β”€ data/                    # Temporary video storage
β”œβ”€β”€ hls_stream/              # HLS video streaming files
β”œβ”€β”€ frontend/                # React frontend
β”‚   β”œβ”€β”€ src/                 # React source code
β”‚   β”‚   β”œβ”€β”€ components/      # UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ video/       # Video-related components
β”‚   β”‚   β”‚   β”œβ”€β”€ heatmap/     # Heatmap components
β”‚   β”‚   β”‚   β”œβ”€β”€ charts/      # Data visualization
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   └── ...
β”œβ”€β”€ setup/                   # Setup documentation
└── ...

🀝 Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues to suggest improvements or report bugs.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgements


For detailed setup instructions, see the setup guide

About

This project demonstrates real-time object detection in videos using a React frontend and a Flask backend. It utilizes the YOLO model for object detection, Celery for asynchronous task management, and Redis for message brokering. The application includes features for video analysis, heatmap generation, and object tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors