Skip to content

Commit baa22c7

Browse files
authored
Merge pull request adipandas#12 from adipandas/devel
Merge development branch
2 parents e8e2a82 + a029fa6 commit baa22c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5744
-5944
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.ipynb_checkpoints/
2-
video_data/
2+
examples/video_data/
33
.idea/
44
examples/output.avi
5-
pretrained_models/caffemodel_weights/
6-
pretrained_models/tensorflow_weights/
7-
pretrained_models/yolo_weights/
5+
examples/pretrained_models/caffemodel_weights/
6+
examples/pretrained_models/tensorflow_weights/
7+
examples/pretrained_models/yolo_weights/
88

99
# Byte-compiled / optimized / DLL files
1010
__pycache__/

DOWNLOAD_WEIGHTS.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Instructions to download pretrained neural-network weights.
2+
3+
##### YOLOv3
4+
```
5+
cd ./examples/pretrained_models/yolo_weights
6+
sudo chmod +x ./get_yolo.sh
7+
./get_yolo.sh
8+
```
9+
10+
##### TensorFlow - MobileNetSSDv2
11+
```
12+
cd ./pretrained_models/tensorflow_weights
13+
sudo chmod +x ./get_ssd_model.sh
14+
./get_ssd_model.sh
15+
```
16+
17+
##### Caffemodel - MobileNetSSD
18+
```
19+
cd ./pretrained_models/caffemodel_weights
20+
sudo chmod +x ./get_caffemodel.sh
21+
./get_caffemodel.sh
22+
```

README.md

Lines changed: 38 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
1-
[cars-yolo-output]: ./assets/cars.gif "Sample Output with YOLO"
2-
[cows-tf-ssd-output]: ./assets/cows.gif "Sample Output with SSD"
1+
[cars-yolo-output]: examples/assets/cars.gif "Sample Output with YOLO"
2+
[cows-tf-ssd-output]: examples/assets/cows.gif "Sample Output with SSD"
33

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

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

9-
### Available Trackers
10-
```
11-
SimpleTracker
129

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

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

19-
![Cars with YOLO][cars-yolo-output]
16+
## Available Multi Object Trackers
2017

21-
#### Tensorflow-SSD-MobileNet
22-
Video Source: [link](https://flic.kr/p/26WeEWy)
18+
```
19+
CentroidTracker
20+
IOUTracker
21+
CentroidKF_Tracker
22+
SORT
23+
```
2324

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

27+
```
28+
detector.TF_SSDMobileNetV2
29+
detector.Caffe_SSDMobileNet
30+
detector.YOLOv3
31+
```
32+
33+
## Installation
2634

27-
### Installation
2835
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:
2936

3037
```
@@ -43,56 +50,30 @@ cd multi-object-tracker
4350
pip install -e .
4451
```
4552

46-
### YOLO
47-
48-
Do the following in the terminal to download a pretrained weights of YOLO:
49-
```
50-
cd ./pretrained_models/yolo_weights
51-
sudo chmod +x ./get_yolo.sh
52-
./get_yolo.sh
53-
```
54-
55-
### TensorFlow model
56-
57-
Do the following in the terminal to download a pretrained model:
58-
```
59-
cd ./pretrained_models/tensorflow_weights
60-
sudo chmod +x ./get_ssd_model.sh
61-
./get_ssd_model.sh
62-
```
53+
Note - for using neural network models with GPU
54+
---
55+
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.
6356

64-
**SSD-Mobilenet_v2_coco_2018_03_29** was used for this example.
65-
Other networks can be downloaded and ran: Go through `tracking-tensorflow-ssd_mobilenet_v2_coco_2018_03_29.ipynb` for more details.
66-
67-
### Caffemodel
68-
69-
Do the following in the terminal to download a pretrained model:
70-
```
71-
cd ./pretrained_models/caffemodel_weights
72-
sudo chmod +x ./get_caffemodel.sh
73-
./get_caffemodel.sh
74-
```
57+
For building opencv from source, you can refer the following:
58+
[[link-1](https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html)],
59+
[[link-2](https://www.pyimagesearch.com/2020/02/03/how-to-use-opencvs-dnn-module-with-nvidia-gpus-cuda-and-cudnn/)]
7560

76-
This is a MobileNet-SSD caffemodel.
61+
## How to use?: Examples
7762

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

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

82-
### References and Credits
83-
This work is based on the following literature:
84-
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)]
85-
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/)
86-
3. [correlationTracker](https://github.com/Wenuka/correlationTracker)
87-
4. [Caffemodel zoo](http://caffe.berkeleyvision.org/model_zoo.html)
88-
5. [Caffemodel zoo GitHub](https://github.com/BVLC/caffe/tree/master/models)
89-
6. [YOLO v3](https://pjreddie.com/media/files/papers/YOLOv3.pdf)
68+
You will have to download the pretrained weights for the neural-network models.
69+
The shell scripts for downloading these are provided in [examples](examples/) folder.
70+
Please refer [DOWNLOAD_WEIGHTS.md](DOWNLOAD_WEIGHTS.md) for more details.
9071

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

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

95-
### Citation
76+
## Citation
9677

9778
If you use this repository in your work, please consider citing it with:
9879
```

REFERENCES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# References and Credits
2+
3+
This work is based on the following literature:
4+
5+
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)]
6+
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)]
7+
3. YOLOv3. [[pdf](https://pjreddie.com/media/files/papers/YOLOv3.pdf)][[website](https://pjreddie.com/darknet/yolo/)]
8+
4. Kalman Filter. [[wiki](https://en.wikipedia.org/wiki/Kalman_filter)]
9+
5. TensorFlow Object Detection API [[github](https://github.com/tensorflow/models/tree/master/research/object_detection)]
10+
6. Caffe [[website](https://caffe.berkeleyvision.org/)][[github](https://github.com/BVLC/caffe)]
11+
12+
13+
#### Link to `multi-object-tracker` [[webpage](https://adipandas.github.io/multi-object-tracker/)][[GitHub Repo](https://github.com/adipandas/multi-object-tracker)]

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
title: Multi-object trackers in Python
2+
description:
23
theme: jekyll-theme-cayman

0 commit comments

Comments
 (0)