This project implements a real-time object detection and tracking system using YOLOv8 and OpenCV. It can detect and track multiple objects in a video stream, with features like object counting and trajectory visualization.
- Real-time object detection using YOLOv8
- Multiple object tracking
- Object counting
- Trajectory visualization
- Support for both webcam and video file input
- Configurable detection confidence threshold
- Python 3.8+
- OpenCV
- PyTorch
- Ultralytics (YOLOv8)
- NumPy
- Clone this repository
- Install the required packages:
pip install -r requirements.txtRun the main script:
python object_detection.pyBy default, the program uses your webcam. To use a video file, modify the source in the script.
object_detection.py: Main script for object detection and trackingutils.py: Helper functions and utilitiesrequirements.txt: Project dependenciesREADME.md: Project documentation
- Uses YOLOv8 for state-of-the-art object detection
- Implements a custom tracking algorithm for object persistence
- Optimized for real-time performance
- Supports multiple object classes from COCO dataset
- Add support for custom object detection models
- Implement object classification
- Add GUI for parameter configuration
- Support for multiple camera inputs
- Export tracking data to CSV/JSON