
TransReID-ViT-B-JPM
Detection and tracking475 ops103.6M params
A pure-transformer re-identification model on a DeiT-S backbone, with shuffled patch groups and camera embeddings.
Detection and tracking · 478 operations Checked
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.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}