Skip to content

YOLOv9 and supervision for real-time object detection and logging on security cameras

License

Notifications You must be signed in to change notification settings

abidikshit/real-time-object-detection-using-yolov9e

Repository files navigation

Real-Time Object Detection with YOLOv9 and Supervision

Watch the video

Overview

This project showcases real-time object detection using YOLOv9, coupled with Supervision for annotating detected objects on security camera feeds. The system generates real-time logs in nested JSON format, detailing object counts with respective timestamps, and implements a priority system to flag objects based on predefined criteria.

Features

  • Real-Time Object Detection: Utilizes YOLOv9 for real-time object detection on security camera feeds.
  • Annotation and Visualization: Uses Supervision for annotating detected objects on frames with labels.
  • Data Logging: Generates nested JSON logs with object counts and timestamps for each frame.
  • Priority System: Implements a priority system to give real-time alerts based on object presence and duration.
  • Configurability: Supports configuration through a JSON file, allowing easy customization of camera URLs and other parameters.

Requirements

  • Python 3.x
  • OpenCV (cv2)
  • Supervision
  • Ultralytics YOLO

Installation

  1. Clone the repository:

    git clone https://github.com/abidikshit/real-time-object-detection-using-yolov9e.git
  2. Navigate to the project directory:

    cd real-time-object-detection-using-yolov9e
  3. Install the required packages:

    pip install -r requirements.txt

Usage

  1. Update the config.json file with your camera details and other configurations.
  2. Run the main script:
    python main.py --config config.json

Directory Structure

├── main.py # Main script for real-time object detection
├── supervision.py # Annotator and other utilities using Supervision
├── yolov9e.pt # Pre-trained YOLOv9 model
├── config.json # Configuration file
├── requirements.txt # Required Python packages
├── output.json # JSON logs with object counts and timestamps
├── class_counts.csv # CSV file with class counts
└── README.md # Project documentation

License

This project is licensed under the MIT License. See LICENSE for more details.

About

YOLOv9 and supervision for real-time object detection and logging on security cameras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages