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

Shengcai Liao, Ling Shao
5/30/2021
83 citations
cs.CV
transformer-attention

Official code: ShengcaiLiao/QAConv (219 stars, Python, MIT, last commit 2023-01-03). 1 more implementation below.

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
ShengcaiLiao/QAConvOfficial219PythonMIT2023-01-03
ShengcaiLiao/TransMatcherCommunity30PythonMIT2024-09-03
MIT

[ECCV 2020] QAConv: Interpretable and Generalizable Person Re-Identification with Query-Adaptive Convolution and Temporal Lifting, and [CVPR 2022] GS: Graph Sampling Based Deep Metric Learning

21931Python, MATLABJul 8, 20193 years agoMIT
adaptive-convolutioncorrespondencedeep-metric-learningdomain-generalizationgeneralizability+15 more
MIT

[NeurIPS 2021] TransMatcher: Deep Image Matching Through Transformers for Generalizable Person Re-identification

302Python, MATLABJun 3, 20222 years agoMIT
correspondencedeep-metric-learningdomain-generalizationgeneralizabilitygeneralization+15 more

Similar Papers

Cite this paper

@article{liao2021transmatcher,
  title  = {TransMatcher: Deep Image Matching Through Transformers for Generalizable Person Re-identification},
  author = {Shengcai Liao and Ling Shao},
  year   = {2021},
  eprint = {2105.14432},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.14432}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2105.14432.svg)](https://codeofpaper.com/paper/2105.14432)

Discussion