$R^{2}$ Former: Unified Retrieval and Reranking Transformer for Place Recognition

Sijie Zhu, Linjie Yang, Chen Chen, M. Shah, Xiaohui Shen +1 more
2/14/2026

No official code found. Best implementation: bytedance/R2Former (104 stars, Apache-2.0, last commit 2023-06-15).

Abstract

Visual Place Recognition (VPR) estimates the location of query images by matching them with images in a reference database. Conventional methods generally adopt aggregated CNN features for global retrieval and RANSAC-based geometric verification for reranking. However, RANSAC only employs geometric information but ignores other possible information that could be useful for reranking, e.g. local feature correlations, and attention values. In this paper, we propose a unified place recognition framework that handles both retrieval and reranking with a novel transformer model, named $R^{2}$ Former. The proposed reranking module takes feature correlation, attention value, and $xy$ coordinates into account, and learns to determine whether the image pair is from the same location. The whole pipeline is end-to-end trainable and the reranking module alone can also be adopted on other CNN or transformer backbones as a generic component. Remarkably, $R^{2}$ Former significantly outperforms state-of-the-art methods on major VPR datasets with much less inference time and memory consumption. It also achieves the state-of-the-art on the hold-out MSLS challenge set and could serve as a simple yet strong solution for real-world large-scale applications. Experiments also show vision transformer tokens are comparable and sometimes better than CNN local features on local matching. The code is released at https://github.com/Jeff-Zilence/R2Former.

View on arXivView PDF

Code Implementations(1)

bytedance/R2FormerCommunity70%
Apache-2.0

Official repository for R2Former: Unified Retrieval and Reranking Transformer for Place Recognition

1046Shell, PythonJun 15, 20233 years agoApache-2.0
research

Similar Papers

Cite this paper

@article{zhu2026r,
  title  = {$R^{2}$ Former: Unified Retrieval and Reranking Transformer for Place Recognition},
  author = {Sijie Zhu and Linjie Yang and Chen Chen and M. Shah and Xiaohui Shen and Heng Wang},
  year   = {2026},
  eprint = {2304.03410},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2304.03410},
  journal = {CVPR 2023 2023}
}

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/2304.03410.svg)](https://codeofpaper.com/paper/2304.03410)

Discussion