Torchreid is a PyTorch library for deep-learning person re-identification, the computer vision task of matching the same person across different camera views. Developed by Kaiyang Zhou and contributors, the project has earned more than 4,900 stars on GitHub and saw updates in 2026.
Person re-identification underpins surveillance analytics, retail tracking and image retrieval systems, and Torchreid gives researchers a complete, extensible toolkit for it. It supports both image-based and video-based re-identification, end-to-end training and evaluation, multi-GPU training, and standard protocols used across research papers. Preparing datasets is deliberately simple, and the library supports multi-dataset training and cross-dataset evaluation for domain generalisation studies. A documented model zoo provides implementations of state-of-the-art re-identification models, including the OSNet family from the authors’ ICCV 2019 work, with pretrained weights also published on Hugging Face.
Beyond training from scratch, Torchreid emphasises reproducibility throughout. It reports results under the evaluation protocols used by most re-identification papers, provides visualisation tools for ranked retrieval lists and training curves through TensorBoard, and documents every step from dataset download to final testing. The project also maintains a list of follow-up research built on top of the library, which shows how widely it has been adopted as shared infrastructure in the re-identification field, and its modular design means new backbones, losses and samplers can be registered with only a few lines of code.
Torchreid is free and open source under the MIT license. Documentation, tutorials and the model zoo are available on the project website at no cost.
Torchreid is for computer vision researchers and engineers working on person re-identification, image retrieval and metric learning. It suits academic groups reproducing benchmark results as well as applied teams that need a solid, well-tested PyTorch foundation for identity matching across cameras.