All models

TransReID-DeiT-S

A pure-transformer re-identification model on a DeiT-S backbone, with shuffled patch groups and camera embeddings.

Detection and tracking · 478 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (33 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
27M
Operations
478
Framework
PyTorch
Recurrent
No
Published
ICCV (arXiv 2021)
Cited by
1,231 (as of 19 October 2026)
Authors
Shuting He, Hao Luo, Pichao Wang and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3180
Graph hash
19eb62419571150a72a4c381371835fb8c9408c492f8217e1c3836286b9da1a3
Skeleton hash
fa56ea82eed958989aee2efbf9508680129d9ae45df0c4f13da294f62b414bd8
Architecture hash
7d7a1ebb73ab7d72e959064cfae04bb5991998835be4d57424855129c7597aa5
Diagram SHA-256
041668ce64acc77ab592869873af58a8cbfb66bc706d80f516e73e0a04f234d4
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

TransReID is a pure transformer-based framework for object re-identification, or ReID. ReID aims to associate a particular object across different scenes and camera views, as in person ReID and vehicle ReID. The authors' case against convolutional networks is that they only process one local neighborhood at a time and lose detail through convolution and downsampling operators such as pooling and strided convolution. A transformer, by contrast, has a global receptive field in every layer and no downsampling operations, so detailed information is preserved. The authors describe this as, to the best of their knowledge, the first work to adopt a pure transformer for ReID research.

The model first encodes an image as a sequence of patches and builds a transformer-based strong baseline with a few critical improvements. One of those improvements is overlapping patches: instead of the non-overlapping split used by ViT and DeiT, a sliding window generates patches that share pixels with their neighbours. Two further modules are then added to strengthen robust feature learning. The jigsaw patch module, or JPM, rearranges the patch embeddings via shift and patch shuffle operations before regrouping them. Thanks to that shuffle, each local feature can cover patches from different body or vehicle parts. The side information embeddings, or SIE, plug in learnable embeddings for non-visual clues such as camera and viewpoint, to mitigate feature bias towards camera and view variations. During inference the global feature and the local features are concatenated as the final feature representation.

The member captured here is the DeiT-S size of TransReID, and the paper finds DeiT-S/16 a little bit better in performance and speed compared to ResNet50. Person images are resized to 256×128, and vehicle images to 256×256. The paper sets m = 5 and k = 4 for person ReID datasets, so the jigsaw branch yields four local features. The DeiT weights come from ImageNet-1K training only, while the ViT weights were pre-trained on ImageNet21K and then finetuned on ImageNet-1K. The authors also note that, compared with ViT, DeiT is more sensitive to hyperparameter settings. With both modules together, TransReID reaches 64.9% mAP on MSMT17 and 80.6% mAP on VeRi-776.

Key idea. TransReID brings a pure transformer to object re-identification and adds two modules, a jigsaw patch module that shuffles and regroups patch embeddings and a side information embedding that encodes camera and viewpoint as learnable embeddings.

  • transreid
  • transformer-based object re-identification
  • re-identification
  • reid
  • person reid
  • vehicle reid
  • jigsaw patch module
  • jpm
  • side information embeddings
  • sie
  • deit-s
  • transreid-deit-s
  • market-1501
  • msmt17
  • veri-776

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{he2021transreidtransformerbasedobjectreidentification,
      title={TransReID: Transformer-based Object Re-Identification}, 
      author={Shuting He and Hao Luo and Pichao Wang and Fan Wang and Hao Li and Wei Jiang},
      year={2021},
      eprint={2102.04378},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2102.04378}, 
}