# TransMatcher: Deep Image Matching Through Transformers for Generalizable Person Re-identification

arXiv: https://arxiv.org/abs/2105.14432 · HTML: https://mlsanity.com/paper/2105.14432/

## Key facts

- Cited by 32 papers in the map (data through 14 Oct 2026).
- Builds on 37 of its 50 references that are in the map.
- First posted on arXiv 30 May 2021.

## Builds on (most cited first, 30 of 37)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://mlsanity.com/paper/2103.14030/) (2021)
- [End-to-End Object Detection with Transformers](https://mlsanity.com/paper/2005.12872/) (2020)
- [Squeeze-and-Excitation Networks](https://mlsanity.com/paper/1709.01507/) (2017)
- [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://mlsanity.com/paper/2010.04159/) (2020)
- [CBAM: Convolutional Block Attention Module](https://mlsanity.com/paper/1807.06521/) (2018)
- [Non-local Neural Networks](https://mlsanity.com/paper/1711.07971/) (2017)
- [Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions](https://mlsanity.com/paper/2102.12122/) (2021)
- [Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking](https://mlsanity.com/paper/1609.01775/) (2016)
- [Person Transfer GAN to Bridge Domain Gap for Person Re-Identification](https://mlsanity.com/paper/1711.08565/) (2017)
- [Beyond Part Models: Person Retrieval with Refined Part Pooling (and a Strong Convolutional Baseline)](https://mlsanity.com/paper/1711.09349/) (2017)
- [Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net](https://mlsanity.com/paper/1807.09441/) (2018)
- [Omni-Scale Feature Learning for Person Re-Identification](https://mlsanity.com/paper/1905.00953/) (2019)
- [Learning Discriminative Features with Multiple Granularities for Person Re-Identification](https://mlsanity.com/paper/1804.01438/) (2018)
- [Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro](https://mlsanity.com/paper/1701.07717/) (2017)
- [Re-ranking Person Re-identification with k-reciprocal Encoding](https://mlsanity.com/paper/1701.08398/) (2017)
- [Improved Texture Networks: Maximizing Quality and Diversity in Feed-forward Stylization and Texture Synthesis](https://mlsanity.com/paper/1701.02096/) (2017)
- [Harmonious Attention Network for Person Re-Identification](https://mlsanity.com/paper/1802.08122/) (2018)
- [Joint Detection and Identification Feature Learning for Person Search](https://mlsanity.com/paper/1604.01850/) (2016)
- [Style Normalization and Restitution for Generalizable Person Re-identification](https://mlsanity.com/paper/2005.11037/) (2020)
- [Relation-Aware Global Attention for Person Re-identification](https://mlsanity.com/paper/1904.02998/) (2019)
- [Part-Aligned Bilinear Representations for Person Re-identification](https://mlsanity.com/paper/1804.07094/) (2018)
- [HydraPlus-Net: Attentive Deep Features for Pedestrian Analysis](https://mlsanity.com/paper/1709.09930/) (2017)
- [Interaction-and-Aggregation Network for Person Re-identification](https://mlsanity.com/paper/1907.08435/) (2019)
- [Dual Attention Matching Network for Context-Aware Feature Sequence based Person Re-Identification](https://mlsanity.com/paper/1803.09937/) (2018)
- [Attention-Aware Compositional Network for Person Re-identification](https://mlsanity.com/paper/1805.03344/) (2018)
- [Frustratingly Easy Person Re-Identification: Generalizing Person Re-ID in Practice](https://mlsanity.com/paper/1905.03422/) (2019)
- [Multi-scale Deep Learning Architectures for Person Re-identification](https://mlsanity.com/paper/1709.05165/) (2017)

## Built on by (most cited first, 30 of 32)

- [An Outlook into the Future of Egocentric Vision](https://mlsanity.com/paper/2308.07123/) (2023)
- [PLIP: Language-Image Pre-training for Person Representation Learning](https://mlsanity.com/paper/2305.08386/) (2023)
- [Part-Aware Transformer for Generalizable Person Re-identification](https://mlsanity.com/paper/2308.03322/) (2023)
- [Transformer for Object Re-Identification: A Survey](https://mlsanity.com/paper/2401.06960/) (2024)
- [Cloning Outfits from Real-World Images to 3D Characters for Generalizable Person Re-Identification](https://mlsanity.com/paper/2204.02611/) (2022)
- [Few-Shot Learning Meets Transformer: Unified Query-Support Transformers for Few-Shot Classification](https://mlsanity.com/paper/2208.12398/) (2022)
- [D3Former: Debiased Dual Distilled Transformer for Incremental Learning](https://mlsanity.com/paper/2208.00777/) (2022)
- [ReMix: Training Generalized Person Re-identification on a Mixture of Data](https://mlsanity.com/paper/2410.21938/) (2024)
- [Generalizable Person Re-identification via Balancing Alignment and Uniformity](https://mlsanity.com/paper/2411.11471/) (2024)
- [Dynamic Feature Pruning and Consolidation for Occluded Person Re-Identification](https://mlsanity.com/paper/2211.14742/) (2022)
- [CLIP-DFGS: A Hard Sample Mining Method for CLIP in Generalizable Person Re-Identification](https://mlsanity.com/paper/2410.11255/) (2024)
- [CILP-FGDI: Exploiting Vision-Language Model for Generalizable Person Re-Identification](https://mlsanity.com/paper/2501.16065/) (2025)
- [Unleashing the Potential of Pre-Trained Diffusion Models for Generalizable Person Re-Identification](https://mlsanity.com/paper/2502.06619/) (2025)
- [Fast and Interpretable Face Identification for Out-Of-Distribution Data Using Vision Transformers](https://mlsanity.com/paper/2311.02803/) (2023)
- [What Makes You Unique? Attribute Prompt Composition for Object Re-Identification](https://mlsanity.com/paper/2509.18715/) (2025)
- [DynaMix: Generalizable Person Re-identification via Dynamic Relabeling and Mixed Data Sampling](https://mlsanity.com/paper/2511.19067/) (2025)
- [Learning Robust Visual-Semantic Embedding for Generalizable Person Re-identification](https://mlsanity.com/paper/2304.09498/) (2023)
- [UniPlane: Unified Plane Detection and Reconstruction from Posed Monocular Videos](https://mlsanity.com/paper/2407.03594/) (2024)
- [BIT: Matching-based Bi-directional Interaction Transformation Network for Visible-Infrared Person Re-Identification](https://mlsanity.com/paper/2603.14243/) (2026)
- [Deep Multimodal Fusion for Generalizable Person Re-identification](https://mlsanity.com/paper/2211.00933/) (2022)
- [Bent & Broken Bicycles: Leveraging synthetic data for damaged object re-identification](https://mlsanity.com/paper/2304.07883/) (2023)
- [Origin Identification for Text-Guided Image-to-Image Diffusion Models](https://mlsanity.com/paper/2501.02376/) (2025)
- [Exploring the Camera Bias of Person Re-identification](https://mlsanity.com/paper/2502.10195/) (2025)
- [ReText: Text Boosts Generalization in Image-Based Person Re-identification](https://mlsanity.com/paper/2602.05785/) (2026)
- [Beyond Facial Consistency: Personalized Person Image Generation with Holistic Identity Preservation](https://mlsanity.com/paper/2607.25622/) (2026)
- [Is Synthetic Dataset Reliable for Benchmarking Generalizable Person Re-Identification?](https://mlsanity.com/paper/2209.05047/) (2022)
- [Parameter Hierarchical Optimization for Visible-Infrared Person Re-Identification](https://mlsanity.com/paper/2404.07930/) (2024)
- [Camera-Invariant Meta-Learning Network for Single-Camera-Training Person Re-identification](https://mlsanity.com/paper/2406.14797/) (2024)
- [Unity in Diversity: Multi-expert Knowledge Confrontation and Collaboration for Generalizable Vehicle Re-identification](https://mlsanity.com/paper/2407.07351/) (2024)
- [Privacy-Preserving Adaptive Re-Identification without Image Transfer](https://mlsanity.com/paper/2407.12589/) (2024)

## Abstract (arXiv)

Transformers have recently gained increasing attention in computer vision. However, existing studies mostly use Transformers for feature representation learning, e.g. for image classification and dense predictions, and the generalizability of Transformers is unknown. In this work, we further investigate the possibility of applying Transformers for image matching and metric learning given pairs of images. We find that the Vision Transformer (ViT) and the vanilla Transformer with decoders are not adequate for image matching due to their lack of image-to-image attention. Thus, we further design two naive solutions, i.e. query-gallery concatenation in ViT, and query-gallery cross-attention in the vanilla Transformer. The latter improves the performance, but it is still limited. This implies that the attention mechanism in Transformers is primarily designed for global feature aggregation, which is not naturally suitable for image matching. Accordingly, we propose a new simplified decoder, which drops the full attention implementation with the softmax weighting, keeping only the query-key similarity computation. Additionally, global max pooling and a multilayer perceptron (MLP) head are applied to decode the matching result. This way, the simplified decoder is computationally more efficient, while at the same time more effective for image matching. The proposed method, called TransMatcher, achieves state-of-the-art performance in generalizable person re-identification, with up to 6.1% and 5.7% performance gains in Rank-1 and mAP, respectively, on several popular datasets. Code is available at https://github.com/ShengcaiLiao/QAConv.
