@@ -49,24 +49,25 @@ For using the opencv `dnn`-based object detection modules provided in this repos
49
49
50
50
## How to use?: Examples
51
51
52
- Please refer [ examples] ( https://github.com/adipandas/multi-object-tracker/tree/master/examples ) folder of this repository.
53
- You can clone and run the examples as shown [ here] ( examples/readme.md ) .
54
-
55
- The interface for each tracker is simple and similar.
52
+ The interface for each tracker is simple and similar. Please refer the example template below.
56
53
57
54
```
58
- from mottrackers import CentroidTracker # IOUTracker, CentroidKF_Tracker, SORT
55
+ from motrackers import CentroidTracker # or IOUTracker, CentroidKF_Tracker, SORT
59
56
60
57
input_data = ...
61
58
detector = ...
62
- tracker = CentroidTracker(...)
59
+ tracker = CentroidTracker(...) # or IOUTracker(...), CentroidKF_Tracker(...), SORT(...)
63
60
64
61
while True:
65
62
done, image = <read(input_data)>
66
63
if done:
67
64
break
68
65
69
66
detection_bboxes, detection_confidences, detection_class_ids = detector.detect(image)
67
+ # NOTE:
68
+ # * `detection_bboxes` are numpy.ndarray of shape (n, 4) with each row containing (bb_left, bb_top, bb_width, bb_height)
69
+ # * `detection_confidences` are numpy.ndarray of shape (n,);
70
+ # * `detection_class_ids` are numpy.ndarray of shape (n,).
70
71
71
72
output_tracks = tracker.track(detection_bboxes, detection_confidences, detection_class_ids)
72
73
@@ -78,6 +79,9 @@ while True:
78
79
print(track)
79
80
```
80
81
82
+ Please refer [ examples] ( https://github.com/adipandas/multi-object-tracker/tree/master/examples ) folder of this repository for more details.
83
+ You can clone and run the examples as shown [ here] ( examples/readme.md ) .
84
+
81
85
## Pretrained object detection models
82
86
83
87
You will have to download the pretrained weights for the neural-network models.
0 commit comments