didi / mtmc-vt

MTMC Vehicle Tracking For AI City challenge 2019
Apache License 2.0
70 stars 11 forks source link

AI City Challenge 2019 Track1 MTMC Task

The code is for AI City Challenge 2019 Track1, MTMC Vehicle Tracking.

And we got the second place.

paper

Maintainers

Peilun Li, Guozhen Li, Meiqi Lu, Zhangxi Yan, Youzeng Li

Preparation

Dateset download: Track1-download,Size: 16.2GB

For running code correctly, the data should be put as follows:

├─ aic19-track1-mtmc
│  ├─ train
│  │  ├─ S01
│  │  │  ├─ c001
│  │  │  │  ├─ det
│  │  │  │  ├─ gt
│  │  │  │  ├─ mtsc
│  │  │  │  ├─ segm
│  │  │  │  ├─ calibration.txt
│  │  │  │  ├─ roi.jpg
│  │  │  │  ├─ det_reid_features.txt
│  │  │  │  ├─ vdo.avi
│  │  │  ├─ c002
│  │  │  ├─ c003
│  │  │  ├─ c004
│  │  │  ├─ c005
│  │  ├─ S03
│  │  ├─ S04
│  ├─ test
│  │  ├─ S02
│  │  ├─ S05
│  └─ cam_timestamp

Note that the det_reid_features.txt is the middle result of 1b_merge_visual_feature_with_ other_feature.py, and the other files are provided by organisers.

Step by Step for MTMC Vehicle Tracking

running code orderly

1_crop_vehicle_img_from_vdo.py

For each bounding box, crop the vehicle image and calculate the gps, according to the results of detection.

input:

output:

1a_extract_visual_feature_for_each_img.py

1b_merge_visual_feature_with_other_feature.py

Merge reid feature and gps information into one file.

input:

output:

2_tracking.py

multi targets tracking for each video.

input:

output:

2a_post_process_for_tracking.py

Optimize tracking result to solve target lost.

input:

output:

2b_remove_overlap_boxes.py

Remove overlapped bounding box.

input:

output:

3a_track_based_reid.py

Calculate reid similarity between tracks.

input:

output:

3b_trajectory_processing.py

Calculate the gps-trajectory cohesion between tracks, should run the code trajectory_processing/main.py

input:

output:

4a_match_tracks_for_crossroad.py

MTMC tracking for crossroad scene

input:

output:

4b_match_tracks_for_arterialroad.py

MTMC tracking for arterial road scene

input:

output:

5a_merge_results.py

merge the results from different scenes

input:

output:

5b_adapt_boxes.py

post process for each bounding box

input:

output:

5c_convert_to_submission.py

convert the result to submission format

input:

output:

Guide for use

Run the code from 1_\*.py to 5c_\*.py orderly. The train and inference for ReID follows reid-baseline

We propose starting with 2_tracking.py, if you are the first time to this project. And we provide the results of 1b. You could download it, put them in the right place as metioned above and rename them as det_reid_features.txt.

Extras

result of 1b