Code Monkey home page Code Monkey logo

multi-object-tracker's Introduction

Multi-Object-Tracker

Object detection using deep learning and multi-object tracking

YOLO

Output Sample with YOLO

SSD

Output Sample with SSD

Install OpenCV

Pip install for OpenCV (version 3.4.3 or later) is available here and can be done with the following command:

pip install opencv-contrib-python

Run with YOLO

  1. Open the terminal
  2. Go to yolo_dir in this repository: cd ./yolo_dir
  3. Run: sudo chmod +x ./get_yolo.sh
  4. Run: ./get_yolo.sh

The model and the config files will be downloaded in ./yolo_dir. These will be used tracking-yolo-model.ipynb.

  • The video input can be specified in the cell named Initiate opencv video capture object in the notebook.
  • To make the source as the webcam, use video_src=0 else provide the path of the video file (example: video_src="/path/of/videofile.mp4").

Example video used in above demo: https://flic.kr/p/L6qyxj

Run with TensorFlow SSD model

  1. Open the terminal
  2. Go to the tensorflow_model_dir: cd ./tensorflow_model_dir
  3. Run: sudo chmod +x ./get_ssd_model.sh
  4. Run: ./get_ssd_model.sh

This will download model and config files in ./tensorflow_model_dir. These will be used tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb.

SSD-Mobilenet_v2_coco_2018_03_29 was used for this example. Other networks can be downloaded and ran: Go through tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb for more details.

  • The video input can be specified in the cell named Initiate opencv video capture object in the notebook.
  • To make the source as the webcam, use video_src=0 else provide the path of the video file (example: video_src="/path/of/videofile.mp4").

Video used in SSD-Mobilenet multi-object detection and tracking: https://flic.kr/p/26WeEWy

Run with Caffemodel

  • You have to use tracking-caffe-model.ipynb.
  • The model for use is provided in the folder named caffemodel_dir.
  • The video input can be specified in the cell named Initiate opencv video capture object in the notebook.
  • To make the source as the webcam, use video_src=0 else provide the path of the video file (example: video_src="/path/of/videofile.mp4").

References

The work here is based on the following literature available:

  1. http://elvera.nue.tu-berlin.de/files/1517Bochinski2017.pdf
  2. Pyimagesearch 1, 2
  3. correlationTracker
  4. Caffemodel zoo
  5. Caffemodel zoo GitHub
  6. YOLO v3

Use the caffemodel zoo from the reference [4,5] mentioned above to vary the CNN models and Play around with the codes.

Suggestion: If you are looking for speed go for SSD-mobilenet. If you are looking for accurracy and speed go with YOLO. The best way is to train and fine tune your models on your dataset. Although, Faster-RCNN gives more accurate object detections, you will have to compromise on the detection speed as it is slower as compared to YOLO.

Citation

If you use this repository in your work, please consider citing it with:

@misc{multiobjtracker_amd2018,
  author = {Deshpande, Aditya M.},
  title = {multi-object-tracker},
  year = {2018},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/adipandas/multi-object-tracker}},
}

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.