Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.ipynb_checkpoints/
video_data/
examples/video_data/
.idea/
examples/output.avi
pretrained_models/caffemodel_weights/
pretrained_models/tensorflow_weights/
pretrained_models/yolo_weights/
examples/pretrained_models/caffemodel_weights/
examples/pretrained_models/tensorflow_weights/
examples/pretrained_models/yolo_weights/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
22 changes: 22 additions & 0 deletions DOWNLOAD_WEIGHTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Instructions to download pretrained neural-network weights.

##### YOLOv3
```
cd ./examples/pretrained_models/yolo_weights
sudo chmod +x ./get_yolo.sh
./get_yolo.sh
```

##### TensorFlow - MobileNetSSDv2
```
cd ./pretrained_models/tensorflow_weights
sudo chmod +x ./get_ssd_model.sh
./get_ssd_model.sh
```

##### Caffemodel - MobileNetSSD
```
cd ./pretrained_models/caffemodel_weights
sudo chmod +x ./get_caffemodel.sh
./get_caffemodel.sh
```
95 changes: 38 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
[cars-yolo-output]: ./assets/cars.gif "Sample Output with YOLO"
[cows-tf-ssd-output]: ./assets/cows.gif "Sample Output with SSD"
[cars-yolo-output]: examples/assets/cars.gif "Sample Output with YOLO"
[cows-tf-ssd-output]: examples/assets/cows.gif "Sample Output with SSD"

# Multi-object trackers in Python
Object detection using deep learning and multi-object tracking
Various multi-object tracking algorithms.

[![DOI](https://zenodo.org/badge/148338463.svg)](https://zenodo.org/badge/latestdoi/148338463)

### Available Trackers
```
SimpleTracker

SimpleTracker2
```
`YOLOv3 + CentroidTracker` | `TF-MobileNetSSD + CentroidTracker`
:-------------------------:|:-------------------------:
![Cars with YOLO][cars-yolo-output] | ![Cows with tf-SSD][cows-tf-ssd-output]
Video source: [link](https://flic.kr/p/L6qyxj) | Video source: [link](https://flic.kr/p/26WeEWy)

#### YOLO
Video Source: [link](https://flic.kr/p/89KYXt)

![Cars with YOLO][cars-yolo-output]
## Available Multi Object Trackers

#### Tensorflow-SSD-MobileNet
Video Source: [link](https://flic.kr/p/26WeEWy)
```
CentroidTracker
IOUTracker
CentroidKF_Tracker
SORT
```

![Cows with tf-SSD][cows-tf-ssd-output]
## Available OpenCV-based object detectors:

```
detector.TF_SSDMobileNetV2
detector.Caffe_SSDMobileNet
detector.YOLOv3
```

## Installation

### Installation
Pip install for OpenCV (version 3.4.3 or later) is available [here](https://pypi.org/project/opencv-python/) and can be done with the following command:

```
Expand All @@ -43,56 +50,30 @@ cd multi-object-tracker
pip install -e .
```

### YOLO

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
```

### TensorFlow model

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
```
Note - for using neural network models with GPU
---
For using the opencv `dnn`-based object detection modules provided in this repository with GPU, you may have to compile a CUDA enabled version of OpenCV from source.

**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.

### Caffemodel

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
```
For building opencv from source, you can refer the following:
[[link-1](https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html)],
[[link-2](https://www.pyimagesearch.com/2020/02/03/how-to-use-opencvs-dnn-module-with-nvidia-gpus-cuda-and-cudnn/)]

This is a MobileNet-SSD caffemodel.
## How to use?: Examples

### Examples and How to use:
Please refer [examples](./examples/) folder of this repository.
You can clone and run the examples as shown in the [readme](examples/readme.md) inside the [examples](./examples/) folder.

For examples and how to use this repository, please refer [examples/](examples/) folder.
## Pretrained object detection models

### References and Credits
This work is based on the following literature:
1. 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](http://elvera.nue.tu-berlin.de/files/1517Bochinski2017.pdf)]
2. Pyimagesearch [link-1](https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/), [link-2](https://www.pyimagesearch.com/2018/11/12/yolo-object-detection-with-opencv/)
3. [correlationTracker](https://github.com/Wenuka/correlationTracker)
4. [Caffemodel zoo](http://caffe.berkeleyvision.org/model_zoo.html)
5. [Caffemodel zoo GitHub](https://github.com/BVLC/caffe/tree/master/models)
6. [YOLO v3](https://pjreddie.com/media/files/papers/YOLOv3.pdf)
You will have to download the pretrained weights for the neural-network models.
The shell scripts for downloading these are provided in [examples](examples/) folder.
Please refer [DOWNLOAD_WEIGHTS.md](DOWNLOAD_WEIGHTS.md) for more details.

Use the caffemodel zoo from the reference [4,5] mentioned above to vary the CNN models and Play around with the codes.
## References and Credits

***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.*
Please see [REFERENCES.md](REFERENCES.md)

### Citation
## Citation

If you use this repository in your work, please consider citing it with:
```
Expand Down
13 changes: 13 additions & 0 deletions REFERENCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# References and Credits

This work is based on the following literature:

1. 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. [[pdf](http://elvera.nue.tu-berlin.de/files/1517Bochinski2017.pdf)]
2. Bewley, A., Ge, Z., Ott, L., Ramos, F., & Upcroft, B. (2016, September). Simple online and realtime tracking. In 2016 IEEE International Conference on Image Processing (ICIP) (pp. 3464-3468). IEEE. [[arxiv](https://arxiv.org/abs/1602.00763)]
3. YOLOv3. [[pdf](https://pjreddie.com/media/files/papers/YOLOv3.pdf)][[website](https://pjreddie.com/darknet/yolo/)]
4. Kalman Filter. [[wiki](https://en.wikipedia.org/wiki/Kalman_filter)]
5. TensorFlow Object Detection API [[github](https://github.com/tensorflow/models/tree/master/research/object_detection)]
6. Caffe [[website](https://caffe.berkeleyvision.org/)][[github](https://github.com/BVLC/caffe)]


#### Link to `multi-object-tracker` [[webpage](https://adipandas.github.io/multi-object-tracker/)][[GitHub Repo](https://github.com/adipandas/multi-object-tracker)]
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
title: Multi-object trackers in Python
description:
theme: jekyll-theme-cayman
Loading