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.
- 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.
- Python 3.x
- OpenCV (
cv2
) - Supervision
- Ultralytics YOLO
-
Clone the repository:
git clone https://github.com/abidikshit/real-time-object-detection-using-yolov9e.git
-
Navigate to the project directory:
cd real-time-object-detection-using-yolov9e
-
Install the required packages:
pip install -r requirements.txt
- Update the
config.json
file with your camera details and other configurations. - Run the main script:
python main.py --config config.json
├── 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
This project is licensed under the MIT License. See LICENSE for more details.