Object detection using deep learning and multi-object tracking
SimpleTracker
SimpleTracker2
Video Source: link
Video Source: link
Pip install for OpenCV (version 3.4.3 or later) is available here and can be done with the following command:
pip install numpy matplotlib scipy
pip install opencv-contrib-python
Installation of ipyfilechooser
is recommended if you want to use the jupyter notebooks available in the examples
folder.
pip install ipyfilechooser
git clone https://github.com/adipandas/multi-object-tracker
cd multi-object-tracker
pip install -e .
Do the following in the terminal to download a pretrained weights of YOLO:
cd ./pretrained_models/yolo_weights
sudo chmod +x ./get_yolo.sh
./get_yolo.sh
Do the following in the terminal to download a pretrained model:
cd ./pretrained_models/tensorflow_weights
sudo chmod +x ./get_ssd_model.sh
./get_ssd_model.sh
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.
Do the following in the terminal to download a pretrained model:
cd ./pretrained_models/caffemodel_weights
sudo chmod +x ./get_caffemodel.sh
./get_caffemodel.sh
This is a MobileNet-SSD caffemodel.
For examples and how to use this repository, please refer examples/ folder.
This work is based on the following literature:
- Bochinski, E., Eiselein, V., & Sikora, T. (2017, August). High-speed tracking-by-detection without using image information. In 2017 14th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS) (pp. 1-6). IEEE. [paper-pdf]
- Pyimagesearch link-1, link-2
- correlationTracker
- Caffemodel zoo
- Caffemodel zoo GitHub
- 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.
If you use this repository in your work, please consider citing it with:
@misc{multiobjtracker_amd2018,
author = {Deshpande, Aditya M.},
title = {Multi-object trackers in Python},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/adipandas/multi-object-tracker}},
}
@software{aditya_m_deshpande_2020_3951169,
author = {Aditya M. Deshpande},
title = {Multi-object trackers in Python},
month = jul,
year = 2020,
publisher = {Zenodo},
version = {v1.0.0},
doi = {10.5281/zenodo.3951169},
url = {https://doi.org/10.5281/zenodo.3951169}
}