Skip to content
Merged
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
Update readme
  • Loading branch information
adipandas committed Nov 22, 2020
commit 30842cefcea167723da646338aed38134535f00f
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,25 @@ For using the opencv `dnn`-based object detection modules provided in this repos

## How to use?: Examples

Please refer [examples](https://github.com/adipandas/multi-object-tracker/tree/master/examples) folder of this repository.
You can clone and run the examples as shown [here](examples/readme.md).

The interface for each tracker is simple and similar.
The interface for each tracker is simple and similar. Please refer the example template below.

```
from mottrackers import CentroidTracker # IOUTracker, CentroidKF_Tracker, SORT
from motrackers import CentroidTracker # or IOUTracker, CentroidKF_Tracker, SORT

input_data = ...
detector = ...
tracker = CentroidTracker(...)
tracker = CentroidTracker(...) # or IOUTracker(...), CentroidKF_Tracker(...), SORT(...)

while True:
done, image = <read(input_data)>
if done:
break

detection_bboxes, detection_confidences, detection_class_ids = detector.detect(image)
# NOTE:
# * `detection_bboxes` are numpy.ndarray of shape (n, 4) with each row containing (bb_left, bb_top, bb_width, bb_height)
# * `detection_confidences` are numpy.ndarray of shape (n,);
# * `detection_class_ids` are numpy.ndarray of shape (n,).

output_tracks = tracker.track(detection_bboxes, detection_confidences, detection_class_ids)

Expand All @@ -78,6 +79,9 @@ while True:
print(track)
```

Please refer [examples](https://github.com/adipandas/multi-object-tracker/tree/master/examples) folder of this repository for more details.
You can clone and run the examples as shown [here](examples/readme.md).

## Pretrained object detection models

You will have to download the pretrained weights for the neural-network models.
Expand Down