owais142002 / Road-Object-Tracking

This project showcases an object tracking system that employs YOLOv8 for detection and integrates a Kalman filter for tracking, thereby implementing the DeepSORT algorithm. It is designed to identify and follow objects within a video stream.
0 stars 0 forks source link

Road Objects Tracking System with YOLOv8 and DeepSORT

This project showcases an object tracking system that employs YOLOv8 for detection and integrates a Kalman filter for tracking, thereby implementing the DeepSORT algorithm. It is designed to identify and follow objects within a video stream.

Table of Contents

Project Structure

The project is organized into two main folders:

Project Demo

https://github.com/user-attachments/assets/28b75fbd-2915-4bde-b23e-5ad19dc6ce17

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/your-repo.git
    cd your-repo
  2. Install the required dependencies: Its upto you if you want to make a virtual environment, if yes then write following commands in the terminal:

    pip install virtualenv
    python -m virtualenv venv
    ./venv/Scripts/activate

    Install the requirements using following command

    pip install -r requirements.txt

    Training the Model

    In the training directory, we have jupyter notebook file which can be run cell wise to train the model. The weights will get trained and stored in runs/detect/train/weights/best.pt (model files will be present in the recent train folder which will be made with each train try) Copy the weights to system/detector_model_file/ and use this trained weights for detection.

Custom Training Results

Confusion Matrix
Confusion Matrix
Labels Correlogram
Labels Correlogram
P Curve
P Curve
R Curve
R Curve
PR Curve
PR Curve
Results
Results

Running the System

  1. Navigate to the system directory:
    cd ../system
  2. Run the detection and tracking script:
    python detect.py
  3. The script will process the test.mp4 video file and display the results with bounding boxes and tracking IDs.

Dependencies

The project requires the following dependencies, which are listed in requirements.txt:

Ensure all dependencies are installed by running:

    pip install -r requirements.txt

License

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

Acknowledgments

Thanks to the YOLOv8 and Ultralytics teams for their excellent work on the YOLO object detection framework.

Thanks to the OpenCV community for their powerful computer vision library.

Feel free to contribute to this project by submitting issues or pull requests.