Implementation of object tracking using Python.
The purpose of this repository is to make a simple implementation of an object tracking algorithm. For this purpose,
- A pretrained MobileSSD network (for object detection)
- Euclidean distance (to track objects) is used.
- Python
- Numpy
- OpenCV
- main.py: Main code to capture image from video and process it.
- /model: Folder containing model files for object detection and face detection (to test the tracking algorithm on faces as well)
- /utils: Folder containing classes and functions for tracking.
- tracker.py: Contains Tracker class which calculates Euclidean distance between newly detected object and previous objects. Selects the closest one and do the labeling.
- functions.py: Contains function for calculating the centroid of a given box.
- /cfg: Folder containing the configuration file and writer of configuration file.
- /test: Contains test videos and output of the algorithm.
Using Euclidean distance to track objects has two major drawbacks.
- First, object detector must be run for each frame which is time consuming.
- Second, overlapping objects can change ids resulting for tracker to track wrong objects.
- Implement an object detection model and train it.