Git Product home page Git Product logo

object-detection-and-tracking-using-yolov3-and-deepsort's Introduction

Object-Detection-and-Tracking-using-YOLOv3-and-DeepSORT

This repository implements object detection and tracking using state-of-the-art algorithms, that are, YOLOv3 and DeepSORT in street view imagery. All the computation required will be performed using Google Colab. Mainly, the process will involve two main steps:

First: Train an Object Detector (YOLOv3) to detect target object

Second: Apply Tracker (DeepSORT) to trained YOLOv3 weights to perform tracking

  • Set up google drive:
    • Log in to your google account and go to google drive.
    • Create a folder, by naming it "Object Tracking" and upload this repository to newly created Object Tracking folder.
  • Set up google colab:
    • In the Object Tracking folder in google drive, right click on "Object_Tracking.ipynb" file and select open with -> Google Colaboratory. The file will open in the colab.
    • Next, we need to choose GPU for our training. To do so, click on "Edit" and select "Notebook settings" and then choose "GPU" under Hardware accelerator option.
    • Press "save" and you are good to go.
    • This notebook is created for testing object tracking in colab.
    • Step 1: Place trained YOLOv3 weights in the weights folder at your google drive. Available at: https://drive.google.com/drive/folders/1SfZFt1ch95o9TU-hLbMDuQyCB9xTqwuu?usp=sharing
    • Step 2: Run first cell in the Object_Tracking.ipynb notebook to check which GPU is assigned to you.
    • Step 3: Run second cell to install all the requirements needed for this repository.
    • Step 4: Run third cell to setup NVIDIA driver for GPU
    • Step 5: Run fourth cell that basically converts YOLOv3 weights (darknet) to tensorflow format.
    • Step 6: Run fifth cell that detects and tracks target objects using converted YOLOv3 weights and DeepSORT.

Important measures before Going onto Second Step

  • Make sure you place exact same .names file in your data/labels/ folder for which you trained YOLOv3.
  • Place test video files in data/video/
  • Make sure you replace exact same classes in coco_classes.txt at model_data/ folder for which YOLOv3 is trained.
  • Make sure you replace and use same anchor values in yolo_anchors.txt on which YOLOv3 is trained.
  • Make sure you replace/edit yolo_anchors array in models.py file at yolov3_tf2/ folder with same anchor values used for training YOLOv3. Moreover, the array is divided by the network resolution value that maybe 416, 608, or any value used while training YOLOv3.

Results: Results for Object Detection (YOLOv3) and Tracking (DeepSORT)

FUTURE WORK

  • The Flow can be re-implemented by using other detection algorithms such as YOLOv4, YOLOv5, EfficientDet
  • Use other state-of-the-art object tracking algorithms.

CREDITS:

Darknet framework: http://pjreddie.com/darknet/

object-detection-and-tracking-using-yolov3-and-deepsort's People

Contributors

ahsanr312 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

object-detection-and-tracking-using-yolov3-and-deepsort's Issues

What changes would it be necessary to implement YOLOv4?

Hello, first of all thanks for your contribution!

I would like to know what changes to the code would be necessary to implement perform the Deep SORT but with other models like YOLOv4. Would it be a major change or?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.