{"id":13442784,"url":"https://github.com/PeizeSun/TransTrack","last_synced_at":"2025-03-20T15:31:03.212Z","repository":{"id":40665660,"uuid":"325566491","full_name":"PeizeSun/TransTrack","owner":"PeizeSun","description":"Multiple Object Tracking with Transformer","archived":false,"fork":false,"pushed_at":"2023-04-30T19:30:48.000Z","size":25079,"stargazers_count":648,"open_issues_count":22,"forks_count":108,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-03-13T18:10:05.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeizeSun.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}},"created_at":"2020-12-30T14:08:19.000Z","updated_at":"2025-03-07T02:00:24.000Z","dependencies_parsed_at":"2022-08-03T01:30:18.368Z","dependency_job_id":"a1bd5a88-35ae-40c3-922b-f4fb0c1aa979","html_url":"https://github.com/PeizeSun/TransTrack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeizeSun%2FTransTrack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeizeSun%2FTransTrack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeizeSun%2FTransTrack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeizeSun%2FTransTrack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeizeSun","download_url":"https://codeload.github.com/PeizeSun/TransTrack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244639968,"owners_count":20485959,"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":[],"created_at":"2024-07-31T03:01:50.647Z","updated_at":"2025-03-20T15:31:03.206Z","avatar_url":"https://github.com/PeizeSun.png","language":"Python","funding_links":[],"categories":["Python","Table of Contents","算法论文"],"sub_categories":["DETR变种","**2020**"],"readme":"## TransTrack: Multiple Object Tracking with Transformer\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n![](transtrack.png)\n\n\n## Introduction\n[TransTrack: Multiple Object Tracking with Transformer](https://arxiv.org/abs/2012.15460)\n\n## Updates\n- (22/02/2022) Multi-GPU testing is supported. \n- (29/10/2021) Automatic Mixed Precision(AMP) training is supported. \n- (28/04/2021) Higher performance is reported by training on mixture of CrowdHuman and MOT, instead of first CrowdHuman then MOT. \n- (28/04/2021) Higher performance is reported by pre-training both detection and tracking on CrowdHuman, instead of only detection. \n- (28/04/2021) Higher performance is reported by increasing the number of queries from 300 to 500. \n- (08/04/2021) Refactoring the code.  \n\n## MOT challenge\nDataset | MOTA% | IDF1% | MOTP% | MT% | ML% |  FP | FN | IDS \n:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:\nMOT17 | 74.5 | 63.9| 80.6 | 46.8 | 11.3 | 28323 | 112137 | 3663\nMOT20 | 64.5 | 59.2 | 80.0 | 49.1 | 13.6 | 28566 | 151377 | 3565\n\n## Validation set\nTraining data | Training time | MOTA% | FP% | FN% | IDs% | download\n:---:|:---:|:---:|:---:|:---:|:---:|:---\n[crowdhuman, mot17_half](track_exps/crowdhuman_mot_trainhalf.sh) |  ~45h + 1h  | 67.1 | 3.1  | 29.4 | 0.5 | [671mot17_crowdhuman_mot17.pth](https://drive.google.com/drive/folders/1DjPL8xWoXDASrxgsA3O06EspJRdUXFQ-?usp=sharing)\n[crowdhuman](track_exps/crowdhuman_train.sh)                   |  ~45h       | 56.0 | 11.2 | 32.3 | 0.4 | [560mot17_crowdhuman.pth](https://drive.google.com/drive/folders/1DjPL8xWoXDASrxgsA3O06EspJRdUXFQ-?usp=sharing) \n[mot17_half](track_exps/mot_trainhalf.sh)                        |  9h        | 61.9 | 3.4  | 34.0   |0.7 |[619mot17_mot17.pth](https://drive.google.com/drive/folders/1DjPL8xWoXDASrxgsA3O06EspJRdUXFQ-?usp=sharing_)\n\nIf download link is invalid, models and logs are also available in [Github Release](https://github.com/PeizeSun/TransTrack/releases/tag/v0.1) and [Baidu Drive](https://pan.baidu.com/s/1dcHuHUZ9y2s7LEmvtVHZZw) by code m4iv.\n\n#### Notes\n- We observe about 1 MOTA noise.\n- If the resulting MOTA of your self-trained model is not desired, playing around with the --track_thresh sometimes gives a better performance.\n- The default track_thresh is 0.4, except for 0.5 in crowdhuman.\n- The training time is on 8 NVIDIA V100 GPUs with batchsize 16.\n- We use the models pre-trained on imagenet.\n- (crowdhuman, mot17_half) is first training on crowdhuman, then fine-tuning on mot17_half.\n\n\n## Demo\n\u003cimg src=\"assets/MOT17-11.gif\" width=\"400\"/\u003e  \u003cimg src=\"assets/MOT17-04.gif\" width=\"400\"/\u003e\n\n\n## Installation\nThe codebases are built on top of [Deformable DETR](https://github.com/fundamentalvision/Deformable-DETR) and [CenterTrack](https://github.com/xingyizhou/CenterTrack).\n\n#### Requirements\n- Linux, CUDA\u003e=9.2, GCC\u003e=5.4\n- Python\u003e=3.7\n- PyTorch ≥ 1.5 and [torchvision](https://github.com/pytorch/vision/) that matches the PyTorch installation.\n  You can install them together at [pytorch.org](https://pytorch.org) to make sure of this\n- OpenCV is optional and needed by demo and visualization\n\n\n#### Steps\n1. Install and build libs\n```\ngit clone https://github.com/PeizeSun/TransTrack.git\ncd TransTrack\ncd models/ops\npython setup.py build install\ncd ../..\npip install -r requirements.txt\n```\n\n2. Prepare datasets and annotations\n```\nmkdir crowdhuman\ncp -r /path_to_crowdhuman_dataset/CrowdHuman_train crowdhuman/CrowdHuman_train\ncp -r /path_to_crowdhuman_dataset/CrowdHuman_val crowdhuman/CrowdHuman_val\nmkdir mot\ncp -r /path_to_mot_dataset/train mot/train\ncp -r /path_to_mot_dataset/test mot/test\n```\nCrowdHuman dataset is available in [CrowdHuman](https://www.crowdhuman.org/). \n```\npython3 track_tools/convert_crowdhuman_to_coco.py\n```\nMOT dataset is available in [MOT](https://motchallenge.net/).\n```\npython3 track_tools/convert_mot_to_coco.py\n```\n\n3. Pre-train on crowdhuman\n```\nsh track_exps/crowdhuman_train.sh\npython3 track_tools/crowdhuman_model_to_mot.py\n```\nThe pre-trained model is available [crowdhuman_final.pth](https://drive.google.com/drive/folders/1DjPL8xWoXDASrxgsA3O06EspJRdUXFQ-?usp=sharing).\n\n4. Train TransTrack\n```\nsh track_exps/crowdhuman_mot_trainhalf.sh\n```\n\n5. Evaluate TransTrack\n```\nsh track_exps/mot_val.sh\nsh track_exps/mota.sh\n```\n\n6. Visualize TransTrack\n```\npython3 track_tools/txt2video.py\n```\n\n\n## Test set\nPre-training data | Fine-tuning data | Training time | MOTA% | FP | FN | IDs\n:---:|:---:|:---:|:---:|:---:|:---:|:---:\ncrowdhuman | mot17 | ~40h + 2h | 68.4 | 22137  | 152064  | 3942  \ncrowdhuman | crowdhuman + mot17 | ~40h + 6h | 74.5 | 28323 | 112137 | 3663 \n\n#### Notes\n- Performance on test set is evaluated by [MOT challenge](https://motchallenge.net/).\n- (crowdhuman + mot17) is training on mixture of crowdhuman and mot17.\n- We won't release trained models for test test. Running as in Steps could reproduce them. \n \n#### Steps\n1. Train TransTrack\n```\nsh track_exps/crowdhuman_mot_train.sh\n```\n\nor\n\n1. Mix crowdhuman and mot17\n```\nmkdir -p mix/annotations\ncp mot/annotations/val_half.json mix/annotations/val_half.json\ncp mot/annotations/test.json mix/annotations/test.json\ncd mix\nln -s ../mot/train mot_train\nln -s ../crowdhuman/CrowdHuman_train crowdhuman_train\ncd ..\npython3 track_tools/mix_data.py\n```\n2. Train TransTrack\n```\nsh track_exps/crowdhuman_plus_mot_train.sh\n```\n\n\n## License\n\nTransTrack is released under MIT License.\n\n\n## Citing\n\nIf you use TransTrack in your research or wish to refer to the baseline results published here, please use the following BibTeX entries:\n\n```BibTeX\n\n@article{transtrack,\n  title   =  {TransTrack: Multiple-Object Tracking with Transformer},\n  author  =  {Peize Sun and Jinkun Cao and Yi Jiang and Rufeng Zhang and Enze Xie and Zehuan Yuan and Changhu Wang and Ping Luo},\n  journal =  {arXiv preprint arXiv: 2012.15460},\n  year    =  {2020}\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPeizeSun%2FTransTrack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPeizeSun%2FTransTrack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPeizeSun%2FTransTrack/lists"}