Skip to content

Commit cbd74ad

Browse files
author
bochinski
committed
mot17 added
1 parent 53bf44c commit cbd74ad

File tree

2 files changed

+126
-4
lines changed

2 files changed

+126
-4
lines changed

README.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you think our work is useful in your research, please consider citing:
1919

2020
## Demo
2121
Several demo scripts are included to reproduce the reported results on the [UA-DETRAC](http://detrac-db.rit.albany.edu/)
22-
and the [MOT](https://motchallenge.net/) benchmarks.
22+
and the [MOT](https://motchallenge.net/) 16/17 benchmarks.
2323

2424
Basic demo script:
2525
```
@@ -97,8 +97,56 @@ publication are available here:
9797
* [EB Train](https://tubcloud.tu-berlin.de/s/EtC6cFEYsAU0gFQ/download)
9898
* [EB Test](https://tubcloud.tu-berlin.de/s/oKM3dYhJbMFl1dY/download)
9999

100-
### MOT
101-
To reproduce the reported MOT16 results, use the mot16.py script:
100+
### MOT17
101+
The IOU Tracker was evaluated on the MOT17 benchmark as well. To determine the best parameters for each detector, an
102+
exhaustive search of the parameter space was performed similar to the one of the MOT16 evaluation reported in the paper.
103+
The best configuration for the training sequences is:
104+
105+
| Detector | ![sigma<sub>l<sub>](http://www.sciweavers.org/tex2img.php?eq=\sigma_l&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=)| ![sigma<sub>h</sub>](http://www.sciweavers.org/tex2img.php?eq=\sigma_{h}&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=) | ![sigma<sub>IOU</sub>](http://www.sciweavers.org/tex2img.php?eq=\sigma_{IOU}&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=) | ![t<sub>min</sub>](http://www.sciweavers.org/tex2img.php?eq=t_{min}&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=) |
106+
| -------- | ----------------- | ----------------- | ------------------- | -------------------- |
107+
|DPM | -0.5 | 0.5 | 0.4 | 4 |
108+
|FRCNN | 0.0 | 0.9 | 0.3 | 3 |
109+
|SPD | 0.4 | 0.5 | 0.2 | 2 |
110+
111+
To generate the MOT17 results listed at [MOT17 results](https://motchallenge.net/results/MOT17/), use the mot17.py script.
112+
Note that the parameters from above are hard-coded in the script for your convenience.
113+
```
114+
usage: mot17.py [-h] -m SEQMAP -o RES_DIR -b BENCHMARK_DIR
115+
116+
IOU Tracker MOT17 demo script. The best parameters for each detector are
117+
hardcoded.
118+
119+
optional arguments:
120+
-h, --help show this help message and exit
121+
-m SEQMAP, --seqmap SEQMAP
122+
full path to the seqmap file to evaluate
123+
-o RES_DIR, --res_dir RES_DIR
124+
path to the results directory
125+
-b BENCHMARK_DIR, --benchmark_dir BENCHMARK_DIR
126+
path to the sequence directory
127+
```
128+
129+
Examples (you will probably need to adapt the paths):
130+
```
131+
./mot17.py -m ../motchallenge/seqmaps/c10-train.txt -o ../motchallenge/res/MOT17/iou-tracker -b ../data/mot17/train
132+
./mot17.py -m ../motchallenge/seqmaps/c10-test.txt -o ../motchallenge/res/MOT17/iou-tracker -b ../data/mot17/test
133+
```
134+
135+
##### MOT17 Train Results
136+
| Detector | IDF1 | IDP | IDR | Rcll | Prcn | FAR | GT | MT | PT | ML | FP | FN | IDs | FM | MOTA | MOTP | MOTAL |
137+
| -------- | ---- | --- | --- | ---- | ---- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---- | ---- | ----- |
138+
|DPM |14.3 |39.3 |8.7 | 35.8 | 88.1 | 1.02|546 |45 |195 |306 |5420 |72140|719 | 844 | 30.3| 77.1| 30.9 |
139+
|FRCNN |21.6 |47.5 |14.0 | 52.1 | 97.0 | 0.34|546 |111 |268 |167 |1804 |53774|857 | 876 | 49.7| 88.1| 50.5 |
140+
|SDP |24.4 |44.5 |16.8 | 66.8 | 96.8 | 0.47|546 |197 |240 |109 |2509 |37280|2058 | 2065| 62.7| 83.2| 64.6 |
141+
|All |9.9 |21.5 |6.4 | 51.6 | 94.7 | 0.61|1638 |353 |703 |582 |97331|63194|3634 | 3785| 47.6| 83.4| 48.7 |
142+
143+
##### MOT17 Test Results
144+
| MOTA | MOTP | FAF | MT | ML | FP | FN | ID Sw. | Frag |
145+
| ---- | ---- | --- | ----- | ----- | ----- | ------ | ------ | ---- |
146+
| 45.5 |76.9 |1.1 |15.7\% |40.5\% |19,993 |281,643 | 5,988 |7,404 |
147+
148+
### MOT16
149+
To reproduce the reported [MOT16 results](https://motchallenge.net/results/MOT16/) of the paper, use the mot16.py script:
102150

103151
```
104152
$ ./mot16.py -h
@@ -126,7 +174,7 @@ optional arguments:
126174
minimum track length
127175
```
128176

129-
Example:
177+
Examples (you will probably need to adapt the paths):
130178
```
131179
# SDP:
132180
./mot16.py -m ../motchallenge/seqmaps/sdp-train.txt -o ../motchallenge/res/MOT16/iou-tracker -b ../data/mot17/train

mot17.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env python
2+
3+
# ---------------------------------------------------------
4+
# IOU Tracker
5+
# Copyright (c) 2017 TU Berlin, Communication Systems Group
6+
# Licensed under The MIT License [see LICENSE for details]
7+
# Written by Erik Bochinski
8+
# ---------------------------------------------------------
9+
10+
from time import time
11+
import argparse
12+
13+
from iou_tracker import track_iou
14+
from util import load_mot, save_to_csv
15+
16+
17+
def main(args):
18+
with open(args.seqmap) as fd:
19+
seqs = [line.rstrip('\n') for line in fd]
20+
21+
time_all = 0
22+
for idx, seq in enumerate(seqs):
23+
if seq == "name" or seq == "":
24+
continue
25+
else:
26+
if "DPM" in seq:
27+
sigma_l = -0.5
28+
sigma_h = 0.5
29+
sigma_iou = 0.4
30+
t_min = 4
31+
elif "FRCNN" in seq:
32+
sigma_l = 0.0
33+
sigma_h = 0.9
34+
sigma_iou = 0.3
35+
t_min = 3
36+
elif "SDP" in seq:
37+
sigma_l = 0.4
38+
sigma_h = 0.5
39+
sigma_iou = 0.2
40+
t_min = 2
41+
else:
42+
print("No detector name found, this could happen with the wrong seqmap seqmap file. "
43+
"Please use c10-train.txt, c10-test.txt or c10-all.txt")
44+
exit()
45+
46+
det_path = args.benchmark_dir + "/" + seq + "/det/det.txt"
47+
out_path = args.res_dir + "/" + seq + ".txt"
48+
49+
detections = load_mot(det_path)
50+
51+
start = time()
52+
tracks = track_iou(detections, sigma_l, sigma_h, sigma_iou, t_min)
53+
end = time()
54+
time_all += end-start
55+
56+
num_frames = len(detections)
57+
print("finished " + seq + " at " + str(int(num_frames / (end - start))) + " fps!")
58+
59+
save_to_csv(out_path, tracks)
60+
print time_all
61+
62+
if __name__ == '__main__':
63+
64+
parser = argparse.ArgumentParser(description="IOU Tracker MOT17 demo script. The best parameters for each detector "
65+
"are hardcoded.")
66+
parser.add_argument('-m', '--seqmap', type=str, required=True,
67+
help="full path to the seqmap file to evaluate")
68+
parser.add_argument('-o', '--res_dir', type=str, required=True,
69+
help="path to the results directory")
70+
parser.add_argument('-b', '--benchmark_dir', type=str, required=True,
71+
help="path to the sequence directory")
72+
73+
args = parser.parse_args()
74+
main(args)

0 commit comments

Comments
 (0)