Need help with object-tracker?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

bikz05
333 Stars 158 Forks MIT License 22 Commits 9 Opened issues

Description

Object Tracker written in Python using dlib and OpenCV

Services available

!
?

Need anything else?

Contributors list

# 4,257
Shell
Python
C++
human-b...
16 commits
# 336,691
Python
3 commits
# 211,819
HTML
CSS
1 commit

object-tracker

Image

Real-Time Object Tracker written in Python using dlib and OpenCV | Video 1 Video 2


Quick Links

Dependencies

Starting the code

Tracking can either be done using a live video from a webcam or using a video file.

Tracking using Video File

To run the code using a video file use the following command line argument --

python object-tracker-single.py -v 

For example, you can use the demo video provided with this code as --

python object-tracker-single.py -v demo-video-single.avi

Tracking using Live Video

To run the code using live video use the following command line argument --

python object-tracker-single.py -d 

For example, on most systems device id 0 is the webcam attached.

python object-tracker-single.py -v docs/demo-single-video.avi

Use the

-l
or `--dispLoc' command line option to display the locations of the tracked object as show below -
python object-tracker-single.py -v docs/demo-single-video.avi -l

NOTE -- If you want to do multi object tracking code, use the file

object-tracker-multi.py
instead of
object-tracker-single.py
. This is a hack to do multi-object tracking and hence the code slows down.

How to perform tracking

Once the code starts, it will start the video file or the live stream. To select the objects to be tracked, pause the video by pressing the p key.The next step is to create a bounding box around the object(s) to be tracked. Press the mouse to select the top-left pixel location of the object to be tracked and then release the mouse on the bottom-right location of the object to be tracked. Once, this is done press p to start the tracking. Also, if you want to discard the object, press the d key. In SINGLE OBJECT TRACKING MODE, you can only select one object but in MULTI OBJECT TRACKING MODE, you can select as many objects you want but at the cost of speed. Press esc anytime to gracefully quit the code.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.