Skip to content

SanshruthR/CCTV_YOLO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fast Real-time Object Detection with High-Res Output

Python YOLOv5 CUDA OpenCV Gradio Deployed on Hugging Face image

Overview

Live stream of Las Vegas sidewalk traffic cam, processed with YOLOv5n6 on low-resolution frames, with results drawn on high-resolution frames.

This project demonstrates real-time object detection using the YOLOv5n6 model with low-resolution inference for high-speed processing, while drawing the results on high-resolution frames. The object detection pipeline is deployed as a Gradio app and streams live data from an external camera feed.

Features

  • YOLOv5n6 Model: Pre-trained object detection model optimized for speed and accuracy.
  • Low-resolution Processing: Efficiently processes frames in low resolution (320x180) while mapping results to high-res images.
  • Gradio Interface: Interactive Gradio interface with real-time video stream processing.
  • CUDA Support: Optimized for CUDA-enabled GPUs, ensuring fast inference times.

Model Details

  • Model: YOLOv5n6 (yolov5n6.pt)
  • Confidence Threshold: 0.25
  • IOU Threshold: 0.45
  • Max Detections: 100 objects per frame

How It Works

The pipeline processes a live video stream, detecting objects in each frame using YOLOv5n6. Bounding boxes are drawn on the high-resolution frames based on detections from the low-resolution inference.

Usage

  1. Clone the repository and install the dependencies:

    git clone https://github.com/SanshruthR/CCTV_YOLO.git
    cd cctv-yolo
    pip install -r requirements.txt
  2. Run the script:

    python app.py
  3. Access the Gradio interface and view the live stream processed with YOLOv5n6.

Deployment

This project is deployed on Hugging Face Spaces. You can interact with the app via the following link:

Live Demo on Hugging Face

License

This project is licensed under the MIT License.