Torchreid

Torchreid

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free GitHub

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.

Overview

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.

Key Features

  • Complete person re-identification training and evaluation in PyTorch
  • Supports image and video re-identification tasks
  • Multi-GPU training with standard benchmark protocols
  • Model zoo with state-of-the-art architectures and pretrained weights
  • Easy dataset preparation, multi-dataset training and cross-domain testing
  • Advanced training techniques, metric learning and re-ranking support
  • Highly extensible design for adding models, losses and datasets

๐Ÿ’ณ Pricing

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.

Who Is It For

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.

๐Ÿš€ Visit Torchreid Official Site

๐Ÿšฉ Report an issue