Giter VIP home page Giter VIP logo

real_time_object_detection_and_tracking's Introduction

Real-time Object Tracking and Detection for Video-streams

Pre-req:

  1. OpenCV 3.4
  2. imutils

Download weights here and place them in model_data/

Arguments:

$python3 src/main.py -h
usage: main.py [-h] [--input INPUT] [--output OUTPUT] --model MODEL
               [--config CONFIG] [--classes CLASSES] [--thr THR]

Object Detection and Tracking on Video Streams

optional arguments:
  -h, --help         show this help message and exit
  --input INPUT      Path to input image or video file. Skip this argument to
                     capture frames from a camera.
  --output OUTPUT    Path to save output as video file. Skip this argument if
  					 you don't want the output to be saved. 
  --model MODEL      Path to a binary file of model that contains trained weights.
                     It could be a file with extensions .caffemodel (Caffe) or
                     .weights (Darknet)
  --config CONFIG    Path to a text file of model that contains network
                     configuration. It could be a file with extensions
                     .prototxt (Caffe) or .cfg (Darknet)
  --classes CLASSES  Optional path to a text file with names of classes to
                     label detected objects.
  --thr THR          Confidence threshold for detection. Default: 0.35

Execute code from root directory. Example:

python3 src/main.py --model model_data/yolov2.weights --config model_data/yolov2.cfg --classes model_data/coco_classes.txt --input media/sample_video.mp4 --output out/sample_output.avi

or

python3 src/main.py --model model_data/MobileNetSSD_deploy.caffemodel --config model_data/MobileNetSSD_deploy.prototxt --classes model_data/MobileNet_classes.txt --input media/sample_video.mp4 --output out/sample_output.avi

Note: --input can be ommitted, which will activate stream from webcam. New objects are detected when all current objects being tracked are lost, or when 'q' is pressed

MobileNet_SSD with KCF tracker

MobileNet_SSD with KCF tracker

YOLOv2 with KCF tracker

YOLOv2 with KCF tracker

real_time_object_detection_and_tracking's People

Contributors

apoorvavinod avatar

Watchers

 avatar

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.