- Taking an initial set of object detections
- Creating a unique ID for each of the initial detections
- And then tracking each of the objects as they move around frames in a video, maintaining the assignment of unique IDs
As described in first step, we should detect the from the each frame of video. Here YOLO object detection is used to detect the object in image/video frame. Implemention of yolo is inObjectTracker.py
. Next two steps are implemented inCentroidTracking/centroidtracker.py
.
To run on video file:
python ObjectTracker.py --input videos/car_chase_01.mp4 --confidence 0.5 --threshold 0.3
To run on web-camera:
python ObjectTracker.py --input camera --confidence 0.5 --threshold 0.3
references/credit:
YOLO object detection with OpenCV
Simple object tracking with OpenCV