{"id":13704778,"url":"https://github.com/jiaweihe1996/GMTracker","last_synced_at":"2025-05-05T12:32:33.065Z","repository":{"id":41206804,"uuid":"343674755","full_name":"jiaweihe1996/GMTracker","owner":"jiaweihe1996","description":"Official PyTorch implementation of \"Learnable Graph Matching: Incorporating Graph Partitioning with Deep Feature Learning for Multiple Object Tracking\" (CVPR 2021). ","archived":false,"fork":false,"pushed_at":"2021-12-31T07:48:22.000Z","size":30794,"stargazers_count":113,"open_issues_count":8,"forks_count":23,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-08-03T22:14:03.548Z","etag":null,"topics":["deep-learning","pytorch","tracking-by-detection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jiaweihe1996.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}},"created_at":"2021-03-02T06:53:13.000Z","updated_at":"2024-07-23T08:13:00.000Z","dependencies_parsed_at":"2022-07-31T11:47:59.004Z","dependency_job_id":null,"html_url":"https://github.com/jiaweihe1996/GMTracker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaweihe1996%2FGMTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaweihe1996%2FGMTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaweihe1996%2FGMTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiaweihe1996%2FGMTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiaweihe1996","download_url":"https://codeload.github.com/jiaweihe1996/GMTracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224448716,"owners_count":17313106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["deep-learning","pytorch","tracking-by-detection"],"created_at":"2024-08-02T22:00:16.507Z","updated_at":"2024-11-13T12:31:05.069Z","avatar_url":"https://github.com/jiaweihe1996.png","language":"Python","funding_links":[],"categories":["算法论文"],"sub_categories":["**2021**"],"readme":"\n\n# GMTracker\n\nThis repository is the official PyTorch implementation of the CVPR 2021 paper: *Learnable Graph Matching: Incorporating Graph Partitioning with Deep Feature Learning for Multiple Object Tracking*.   \n[[arXiv](https://arxiv.org/abs/2103.16178)] [[CVF open access](https://openaccess.thecvf.com/content/CVPR2021/html/He_Learnable_Graph_Matching_Incorporating_Graph_Partitioning_With_Deep_Feature_Learning_CVPR_2021_paper.html)]\n\n![Method Visualization](vis/pipeline.jpg)\n\n## Getting Started\n\n1. Clone this repository:\n```clone\ngit clone --recursive https://github.com/jiaweihe1996/GMTracker\n```\n2. Install requirements:\n- Python == 3.6.X\n- PyTorch \u003e= 1.4 with CUDA \u003e=10.0 (tested on PyTorch 1.4.0)\n- torchvision \n- torch_geometric\n\n```setup\npip install -r requirements.txt\n# Install scs-gpu\npip uninstall scs\ncd scs-python\npython setup.py install --scs --gpu\n```\n3. Download the [MOT17](https://motchallenge.net/data/MOT17.zip) data and unzip. The data files' structure is like\n```\n--- data  \n    --- MOT17 \n        --- train  \n            --- MOT17-02  \n            --- MOT17-04  \n            ...  \n        --- test  \n            --- MOT17-01  \n            --- MOT17-03  \n            ...  \n```\n4. Extract inital ReID features:\n\n- **(Preference)** For convenience, we provide the preprocessed detection appearance features, which are stored in `npy` files. You can download them from [GoogleDrive](https://drive.google.com/file/d/1POVU2mWBet6QVX-hOoexeecNU0KrNl6c/view?usp=sharing) or [BaiduPan](https://pan.baidu.com/s/1SOL1hAIrSzYBRsyMYKyOIw) (code: dyvk) and unzip it.\n- Or get refined detections and extract inital ReID features from the ReID model.\n\n\n5. Run GMTracker on a sequence:\n```demo\npython gmtracker_app.py --sequence_dir /path/to/MOT/sequence --detection_file /path/to/detection.npy  --checkpoint_dir /path/to/checkpoint_dir --max_age 100 --reid_thr 0.6 --output_file /path/to/output.txt\n```\nFor example, on MOT17-01 sequence (static camera) with DPM detector:\n```\npython gmtracker_app.py --sequence_dir data/MOT17/test/MOT17-01 --detection_file npy/npytest_tracktor/MOT17-01-DPM.npy  --checkpoint_dir experiments/static/params/0001 --max_age 100 --reid_thr 0.6 --output_file results/test/MOT17-01-DPM.txt\n```\nor cross validation on MOT17-05-DPM (moving camera, fold2 in val set):\n```\npython gmtracker_app.py --sequence_dir data/MOT17/train/MOT17-05 --detection_file npy/npyval_tracktor/MOT17-05-DPM.npy  --checkpoint_dir experiments/moving/params/0001/fold2 --max_age 100 --reid_thr 0.6 --output_file results/crossval/MOT17-05-DPM.txt\n```\n - attributes of each sequences:\n ```\nFOLD0_VAL = ['MOT17-02', 'MOT17-10', 'MOT17-13']\nFOLD1_VAL = ['MOT17-04', 'MOT17-11']\nFOLD2_VAL = ['MOT17-05', 'MOT17-09']\n\nSTATIC = ['MOT17-01', 'MOT17-03', 'MOT17-08', 'MOT17-02', 'MOT17-04', 'MOT17-09']\nMOVING = ['MOT17-06', 'MOT17-07', 'MOT17-12', 'MOT17-14', 'MOT17-05', 'MOT17-10', 'MOT17-11', 'MOT17-13']\n ```\n6. Track on all sequences on MOT17 test set:\n```all\npython motchallenge_tracking.py\n```\n7. Visualize tracking results:\n```demo\npython show_results.py --sequence_dir /path/to/MOT/sequence --result_file /path/to/result.txt --output_file /path/to/output.avi\n```\n8. Cross validation for all sequences on MOT17:\n```val\npython cross_validation.py\n```\n9. Evaluate cross validation results:\n- You should first organize the validation data folder and put the groundtruth file at `MOT17/val/sequense-det/gt/gt.txt` like\n```\n--- val\n    --- MOT17-02-DPM\n        --- gt\n            ---gt.txt\n    --- MOT17-02-FRCNN\n        ...\n    --- MOT17-02-SDP\n        ...\n    --- MOT17-04-DPM\n    ...\n```\n- and run:\n```\npython -m motmetrics.apps.eval_motchallenge ./MOT17/val ./result/val\n```\n10. Training:\n\n    Please download gt.npy from [GoogleDrive](https://drive.google.com/file/d/18T-qNvR_YGuHtk4L3xQDg4bTOTIkBGwz/view?usp=sharing) or [Baidu](https://pan.baidu.com/s/1P-w_NnwQJCffbr06mdvNFg)(code: v277), and unzip them in `./npy/` folder, and run\n```\npython trainGMMOT.py\n```\n11. Tracklet linear interpolation:\n```\npython linear_interpolation.py [--input_dir /path/to/onlinetrackeroutput] --output_dir /path/to/outputdir\n```\n## Acknowledgement\n\nThis implementation is mainly based on [deep_sort](https://github.com/nwojke/deep_sort) repo under GPL-3.0 License. Our ReID model is trained via [deep-person-reid](https://github.com/KaiyangZhou/deep-person-reid) repo. The codes in qpth folder are mainly from [qpth](https://github.com/locuslab/qpth).\n## Citing GMTracker\n\nIf you find this repo useful in your research, please consider citing the following paper:\n\n```\n@InProceedings{he2021gmtracker,\n    author    = {He, Jiawei and Huang, Zehao and Wang, Naiyan and Zhang, Zhaoxiang},\n    title     = {Learnable Graph Matching: Incorporating Graph Partitioning With Deep Feature Learning for Multiple Object Tracking},\n    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},\n    month     = {June},\n    year      = {2021},\n    pages     = {5299-5309}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiaweihe1996%2FGMTracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiaweihe1996%2FGMTracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiaweihe1996%2FGMTracker/lists"}