{"id":28729817,"url":"https://github.com/didi/mtmc-vt","last_synced_at":"2026-03-06T11:01:42.522Z","repository":{"id":86305809,"uuid":"189602911","full_name":"didi/mtmc-vt","owner":"didi","description":"MTMC Vehicle Tracking For AI City challenge 2019","archived":false,"fork":false,"pushed_at":"2019-07-23T07:24:18.000Z","size":82727,"stargazers_count":70,"open_issues_count":14,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-14T16:54:47.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/didi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-31T13:58:37.000Z","updated_at":"2024-08-02T02:13:15.000Z","dependencies_parsed_at":"2023-03-05T03:15:33.917Z","dependency_job_id":null,"html_url":"https://github.com/didi/mtmc-vt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/didi/mtmc-vt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fmtmc-vt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fmtmc-vt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fmtmc-vt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fmtmc-vt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didi","download_url":"https://codeload.github.com/didi/mtmc-vt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fmtmc-vt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30173345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-15T17:11:08.505Z","updated_at":"2026-03-06T11:01:37.511Z","avatar_url":"https://github.com/didi.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI City Challenge 2019 Track1 MTMC Task\nThe code is for AI City Challenge 2019 Track1, MTMC Vehicle Tracking.\n\nAnd we got the second place.\n\n[paper](http://openaccess.thecvf.com/content_CVPRW_2019/papers/AI%20City/Li_Spatio-temporal_Consistency_and_Hierarchical_Matching_for_Multi-Target_Multi-Camera_Vehicle_Tracking_CVPRW_2019_paper.pdf)\n\n## Maintainers\n\nPeilun Li, Guozhen Li, Meiqi Lu, Zhangxi Yan, Youzeng Li\n\n## Preparation\n\nDateset download: [Track1-download,Size: 16.2GB](https://www.aicitychallenge.org/2019-data-sets/)\n\nFor running code correctly, the data should be put as follows:\n\n```\n├─ aic19-track1-mtmc\n│  ├─ train\n│  │  ├─ S01\n│  │  │  ├─ c001\n│  │  │  │  ├─ det\n│  │  │  │  ├─ gt\n│  │  │  │  ├─ mtsc\n│  │  │  │  ├─ segm\n│  │  │  │  ├─ calibration.txt\n│  │  │  │  ├─ roi.jpg\n│  │  │  │  ├─ det_reid_features.txt\n│  │  │  │  ├─ vdo.avi\n│  │  │  ├─ c002\n│  │  │  ├─ c003\n│  │  │  ├─ c004\n│  │  │  ├─ c005\n│  │  ├─ S03\n│  │  ├─ S04\n│  ├─ test\n│  │  ├─ S02\n│  │  ├─ S05\n│  └─ cam_timestamp\n```\n\nNote that the `det_reid_features.txt` is the middle result of `1b_merge_visual_feature_with_\nother_feature.py`, and the other files are provided by organisers. \n\n\n## Step by Step for MTMC Vehicle Tracking\n\n\n### running code orderly \n\n\n#### 1_crop_vehicle_img_from_vdo.py\n\nFor each bounding box, crop the vehicle image and calculate the gps, according to the results of detection.\n\ninput:\n- input_dir:`./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n\noutput:\n- for each video, produce `det_gps_feature.txt` to save gps information\n- for each video, save all cropped image.\n\n#### 1a_extract_visual_feature_for_each_img.py\n\n- extract reid feature for each corpped image, the train and inference pipeline follows reid-baseline\n\n\n#### 1b_merge_visual_feature_with_other_feature.py\n\nMerge reid feature and gps information into one file.\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- gps information file `/det_gps_feature.txt`, from `1`\n- ReID feature file `/deep_features.txt`, from `1a`\n\noutput:\n- for each video, produce `det_reid_features.txt` file\n\n\n#### 2_tracking.py\n\nmulti targets tracking for each video.\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- ID file `already_used_number.txt`, avoid reusing number\n- `/det_reid_features.txt` from `1b`\n\noutput:\n- for each video, produce tracking result file `det_reid_track.txt`\n\n\n#### 2a_post_process_for_tracking.py\n\nOptimize tracking result to solve target lost.\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- fps file `train_fps.txt`\n- for each video, need `det_reid_track.txt` from `2`\n\noutput:\n- for each video, produce tracking result `optimized_track.txt`\n\n\n#### 2b_remove_overlap_boxes.py\n\nRemove overlapped bounding box.\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- for each video, need `optimized_track.txt` from `2a`\n\noutput:\n- for each video, produce tracking result `optimized_track_no_overlapped.txt`\n\n\n#### 3a_track_based_reid.py\n\nCalculate reid similarity between tracks.\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- for each video, need `optimized_track_no_overlapped.txt` from `2b`\n\noutput:\n- ReID similarity file `ranked`\n\n\n#### 3b_trajectory_processing.py\n\nCalculate the gps-trajectory cohesion between tracks, should run the code `trajectory_processing/main.py`\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- for each video, need `optimized_track_no_overlapped.txt` from `2b`\n\noutput:\n- gps-trajectroy file `gps_and_time_new`\n\n#### 4a_match_tracks_for_crossroad.py\n\nMTMC tracking for crossroad scene\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- for each video, need `optimized_track_no_overlapped.txt` from `2b`\n- `ranked` from `3a`\n- `gps_and_time_new` from `3b`\n\noutput:\n- match result `submission_crossroad_train`\n\n#### 4b_match_tracks_for_arterialroad.py\n\nMTMC tracking for arterial road scene\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- for each video, need `optimized_track_no_overlapped.txt` from `2b`\n- `ranked` from `3a`\n- `gps_and_time_new` from `3b`\n\noutput:\n- match result `submission_normal_train`\n\n#### 5a_merge_results.py\n\nmerge the results from different scenes\n\ninput:\n- `submission_crossroad_train` from `4a`\n- `submission_normal_train` from `4b`\n\noutput:\n- merged result file `submission`\n\n#### 5b_adapt_boxes.py\n\npost process for each bounding box\n\ninput:\n- input_dir: `./aic19-track1-mtmc/train`or`./aic19-track1-mtmc/test`\n- `submission` from `5a`\n\noutput:\n- result file `submission_adpt`\n\n#### 5c_convert_to_submission.py\n\nconvert the result to submission format\n\ninput:\n- `submission_adpt` from `5b`\n\noutput:\n- submission file `track1.txt`\n\n\n### Guide for use\nRun the code from `1_\\*.py` to `5c_\\*.py` orderly.\nThe train and inference for ReID follows reid-baseline\n\nWe propose starting with `2_tracking.py`, if you are the first time to this project. And we provide the results of `1b`. \nYou could download it, put them in the right place as metioned above and rename them as `det_reid_features.txt`.\n\n## Extras\nresult of `1b`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fmtmc-vt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidi%2Fmtmc-vt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fmtmc-vt/lists"}