D2-VPR: A Parameter-efficient Visual-foundation-model-based Visual Place Recognition Method via Knowledge Distillation and Deformable Aggregation
Authors: Zheyuan Zhang, Jiwei Zhang, Boyu Zhou, Linzhimeng Duan, Hong Chen
Organizations: School of Computer Science, Beijing University of Posts and Telecommunications · Key Laboratory of Interactive Technology and Experience System, Ministry of Culture and Tourism, Beijing University of Posts and Telecommunications
Visual Place Recognition (VPR) aims to determine the geographic location of a query image by retrieving its most visually similar counterpart from a geo-tagged reference database. Recently, the emergence of the powerful visual foundation model, DINOv2, trained in a self-supervised manner on massive datasets, has significantly improved VPR performance. This improvement stems from DINOv2's exceptional feature generalization capabilities but is often accompanied by increased model complexity and computational overhead that impede deployment on resource-constrained devices. To address this challenge, we propose D2-VPR, a Distillation- and Deformable-based framework that retains the strong feature extraction capabilities of visual foundation models while significantly reducing model parameters and achieving a more favorable performance-efficiency trade-off. Specifically, first, we employ a two-stage training strategy that integrates knowledge distillation and fine-tuning. Additionally, we introduce a Distillation Recovery Module (DRM) to better align the feature spaces between the teacher and student models, thereby minimizing knowledge transfer losses to the greatest extent possible. Second, we design a Top-Down-attention-based Deformable Aggregator (TDDA) that leverages global semantic features to dynamically and adaptively adjust the Regions of Interest (ROI) used for aggregation, thereby improving adaptability to irregular structures. Extensive experiments demonstrate that our method achieves competitive performance compared to state-of-the-art approaches. Meanwhile, it reduces the parameter count by approximately 64.2% (compared to CricaVPR).Code is available at https://github.com/tony19980810/D2VPR.
Figures & tables
Figure 1: The comparison of average R@5 against parameter count on Pitts30k, MSLS-val, and SPED (with image size of 224×224) demonstrates that our model achieves competitive performance despite significantly reduced parameter count, striking an effective trade-off.
Table 1: Summary of the test datasets in experiments.
Method
Pitts30k
MSLS-val
SPED
Pitts250k
AmsterTime
Nordland
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
Cosplace
90.9
95.7
96.7
87.4
94.1
94.9
-
-
-
92.3
97.4
98.4
47.7
69.8
75.8
71.9
83.8
88.1
MixVPR
91.5
95.5
96.3
87.2
93.1
94.3
-
-
-
94.1
98.2
98.9
40.2
59.1
64.6
76.2
86.9
90.3
EigenPlaces
92.5
96.8
97.6
89.1
93.8
95.0
-
-
-
94.1
97.9
98.7
48.9
69.5
76.0
71.2
83.8
88.1
LPS-VPR
91.8
96.0
96.8
89.9
94.2
95.0
84.8
93.9
95.7
94.1
98.0
98.9
-
-
-
-
-
-
BoQ†
92.0
95.6
96.6
86.6
92.3
93.5
82.7
91.3
94.2
94.4
97.9
98.7
42.0
60.5
66.5
78.9
88.5
91.5
Table 2: Comparison with similar-scale SOTA methods on popular benchmarks. The best results are highlighted in bold and the second best are underlined . BoQ† is re-evaluated using the officially provided weights. The input image size is set to 224×224, and the feature dimension is reduced from 16384 to 4096 using PCA for a fairer comparison. - for not reported. Results of Cosplace and MixVPR are reported from EigenPlaces. Here, D2 -VPR does not use cross-image encoder.
Method
Dim.
Backbone
Image
Param.
Size
(M)
Cosplace CVPR’ 2022
2048
ResNet50
No Resize
27.70
MixVPR WACV’ 2023
4096
ResNet50
No Resize
10.88
EigenPlaces ICCV’ 2023
2048
ResNet50
No Resize
27.70
LPS-VPR RAL’ 2024
2048
ResNet50
640×480
29.71
BoQ CVPR’ 2024
4096
ResNet50
224×224
23.84
Table 3: Detailed information of the similar-scale SOTA methods in the comparison. Clus-VPR and EPSA-VPR report only the parameters of their aggregators. Therefore, we use their full ResNet50 version and report 23.51M parameters for the backbone. Note that MixVPR and BoQ utilize a cropped ResNet-50 as their backbone, with the parameter count of the backbone network being less than 23.51M.
Method
Pitts30k
MSLS-val
SPED
Pitts250k
AmsterTime
Nordland
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
CricaVPR∗
94.9
97.3
98.2
90.0
95.4
96.4
91.9
95.7
96.7
97.5
99.4
99.7
64.7
82.8
87.5
90.7
96.3
97.6
SALAD
91.6
95.7
97.1
90.5
95.5
96.2
90.8
95.2
96.9
94.6
98.1
98.9
53.4
75.0
79.9
81.2
91.1
94.0
BoQ
93.1
96.5
97.5
91.6
95.9
96.8
91.8
95.6
96.5
95.9
98.8
99.4
57.6
76.9
81.9
85.8
93.6
95.9
SuperVLAD∗
94.1
97.3
98.0
90.7
95.9
96.8
90.9
95.6
96.5
96.1
99.0
99.5
60.0
80.3
84.4
88.6
94.7
96.5
Sela-global
90.2
96.1
97.1
87.7
95.8
96.6
84.5
91.8
93.9
92.8
98.0
98.9
41.5
62.1
69.3
72.3
89.4
94.4
Table 4: We compare our method with larger-scale SOTA methods on popular benchmarks. To ensure a fair comparison, the evaluation resolution is set to 224×224. Except for CricaVPR, all other methods are originally evaluated at higher resolutions, so we re-evaluate them using their source code and provided weights. Therefore, the results may differ from those reported in the original papers. Methods with the suffix ‘-global’ correspond to the first stage of the two-stage approach.* for using cross-image encoder.
Method
Dim.
Dinov2
Image
Param.
Size
(M)
CricaVPR CVPR’ 2024
4096
Base
224×224
106.76
SALAD CVPR’ 2024
8448
Base
224×224
87.99
BoQ CVPR’ 2024
12288
Base
224×224
95.21
SuperVLAD NIPS’ 2024
3072
Base
224×224
97.61
Sela-global ICLR’ 2024
1024
Large
224×224
357.43
Table 5: Detailed information of the larger-scale SOTA methods in the comparison.
Figure 4: Qualitative VPR comparison results. Our method demonstrates competitive performance compared to these DINOv2-based SOTA models under these challenging cases: long-term appearance changes (first row), drastic lighting variations (second row), perceptual aliasing (third row), and viewpoint changes (fourth row). Green indicates the right match while red is for the wrong one. Key matching regions are highlighted with red dashed boxes.
Figure 5: Method comparison of inference and computational speed on AmsterTime. The inference time includes the inference of both the database and the query set. The batch size is 32. SelaVPR performs calculations in a two-stage manner. PCA is not used here.
Configurations
MSLS-val
R@1
R@5
R@10
Baseline
85.1
93.5
95.3
+distillation
88.4
95.0
96.4
+finetune
91.6
96.1
97.2
Baseline
89.9
95.0
95.7
+DRM
90.5
95.5
96.2
Table 6: Ablation study on the MSLS-val benchmark.
Figure 6: Visualizations of attention maps from the knowledge distillation ablation study are presented below, with rows corresponding to the student model (Ours), teacher model (CricaVPR), and a baseline without distillation. The non-distilled baseline exhibits the strongest focus on irrelevant regions (e.g., ground and sky), followed by the student model, while the teacher model best suppresses such spurious attention.
Batchsize
MSLS-val
R@1
R@5
R@10
1
90.9
95.8
96.6
16
90.5
96.5
96.9
32
91.1
96.5
96.8
64
90.9
96.2
96.8
128
91.6
96.1
97.2
Table 7: Influence of bathsize on D2 -VPR.
Method
Dinov2
Pitts30k
MSLS-val
SPED
Pitts250k
ArmsterTime
Nordland
R@1
R@5
R@1
R@5
R@1
R@5
R@1
R@5
R@1
R@5
R@1
R@5
CricaVPR encoder, batchszie=1
Base
91.8
95.8
89.1
95.1
87.6
93.1
94.6
98.3
49.0
69.3
80.5
90.7
D2 -VPR encoder, batchszie=1
Small
91.8
96.2
91.1
96.1
83.2
91.4
94.9
98.4
48.7
69.6
77.6
88.5
SuperVLAD no encoder
Base
92.6
96.2
90.7
95.5
89.1
94.4
95.2
98.4
50.6
73.4
74.6
85.7
D2 -VPR no encoder
Small
91.6
95.8
90.9
95.5
86.2
93.2
94.6
98.4
49.1
70.3
78.0
89.1
Table 8: Performance comparison with methods that use cross-image encoders (CricaVPR and SuperVLAD) when the cross-image encoder is not employed. Here, D2 -VPR and CricaVPR do not use PCA.
Method
Dim.
Pitts30k
MSLS-val
SPED
Pitts250k
Amstertime
Nordland
R@1
R@5
R@1
R@5
R@1
R@5
R@1
R@5
R@1
R@5
R@1
R@5
D2 -VPR encoder
10752
94.9
97.3
91.6
96.5
91.3
96.2
97.8
99.4
62.9
80.7
87.2
94.5
D2 -VPR encoder +PCA
4096
94.9
97.3
91.6
96.1
90.9
96.0
97.8
99.4
62.9
80.8
86.6
94.1
BoQ
16384
92.1
95.8
87.8
92.3
84.2
93.6
94.7
98.2
43.5
62.3
79.5
88.9
BoQ +PCA
4096
92.0
95.6
86.6
92.3
82.7
91.3
94.4
97.9
42.0
60.5
78.9
88.5
Table 9: Comparison of feature dimensions vs. performance (R@1 and R@5) across six datasets.
Component
Param. (M)
Adapter
2.30
Backbone
22.16
Distill Recovery Module
1.17
Deformable Aggregator
1.58
Cross-image Encode
11.03
All
38.24
Table 10: Analysis of model parameter quantity.
Figure 7: Qualitative attention map of our model. The images are sourced from Pitts30k, Pitts250k, MSLS, Nordland, SPED, and AmsterTime. Their content ranges from natural scenes to urban environments, and they include both black-and-white and color images.
Visual Place Recognition (VPR) determines a query image's geographic location by matching it against geotagged databases. However, existing methods struggle with perceptual aliasing caused by irrelevant regions and inefficient re-ranking due to rigid candidate scheduling. To address these issues, we introduce FoL++, a method combining robust discriminative region modeling with adaptive re-ranking. Specifically, we propose a Reliability Estimation Branch to generate spatial reliability maps that explicitly model occlusion resistance. This representation is further optimized by two spatial alignment losses (SAL and SCEL) to effectively align features and highlight salient regions. For weakly supervised learning without manual annotations, a pseudo-correspondence strategy generates dense local feature supervision directly from aggregation clusters. Our Adaptive Candidate Scheduler dynamically resizes candidate pools based on global similarity. By weighting local matches by reliability and adaptively fusing global and local evidence, FoL++ surpasses traditional independent matching systems. Extensive experiments across seven benchmarks demonstrate that FoL++ achieves state-of-the-art performance with a lightweight memory footprint, improving inference speed by 40% over FoL. Code and models will be released (and merged with FoL) at https://github.com/chenshunpeng/FoL.
Shunpeng Chen, Yukun Song, Changwei Wang +6
School of Artificial Intelligence, Beijing University of Posts and Telecommunications, Beijing 100876, China. · Key Laboratory of Computing Power Network and Information Security, Ministry of Education, Shandong Computer Science Center, Qilu University of Technology. · Spatialtemporal AI. +1
Visual place recognition (VPR) aiming at predicting the location of an image based solely on its visual features is a fundamental task in robotics and autonomous systems. Domain variation remains one of the main challenges in VPR and is relatively unexplored. Existing VPR models attempt to achieve domain agnosticism either by training on large-scale datasets that inherently contain some domain variations, or by being specifically adapted to particular target domains. In practice, the former lacks explicit domain supervision, while the latter generalizes poorly to unseen domain shifts. This paper proposes a novel query-based domain-agnostic VPR model called QdaVPR. First, a dual-level adversarial learning framework is designed to encourage domain invariance for both the query features forming the global descriptor and the image features from which these query features are derived. Then, a triplet supervision based on query combinations is designed to enhance the discriminative power of the global descriptors. To support the learning process, we augment a large-scale VPR dataset using style transfer methods, generating various synthetic domains with corresponding domain labels as auxiliary supervision. Extensive experiments show that QdaVPR achieves state-of-the-art performance on multiple VPR benchmarks with significant domain variations. Specifically, it attains the best Recall@1 and Recall@10 on nearly all test scenarios: 93.5%/98.6% on Nordland (seasonal changes), 97.5%/99.0% on Tokyo24/7 (day-night transitions), and the highest Recall@1 across almost all weather conditions on the SVOX dataset. Our code will be released at https://github.com/shuimushan/QdaVPR.
Shanshan Wan, Lai Kang, Yingmei Wei +3
College of Systems Engineering and the Laboratory for Big Data and Decision, National University of Defense Technology, Changsha, Hunan 410073, China
Recent visual place recognition (VPR) studies have increasingly relied on large-scale datasets to train more robust and discriminative models. Although this trend significantly improves recognition performance, it also introduces substantial storage and training costs, especially when new architectures or training strategies need to be repeatedly developed and evaluated. Dataset pruning (DP) provides a promising way to improve data efficiency by retaining only informative training data. However, conventional DP methods mainly follow the sample-wise classification paradigm, which overlooks the relation-dependent training nature of VPR, where supervision is typically formed by image pairs rather than independent images. To address this issue, we propose a place-wise dataset pruning framework tailored for VPR. Instead of pruning individual images, our method treats each place as the basic pruning unit and introduces two complementary novel metrics, i.e., intra-place diversity (IPD) and inter-place similarity (IPS), to evaluate the training value of each place. By jointly considering these two metrics, our method ranks all places and constructs a compact yet informative coreset, thereby allowing the pruned dataset to still support the training of robust and discriminative VPR models. Extensive experiments demonstrate that our method consistently outperforms state-of-the-art DP baselines under different pruning ratios while reducing selection and training costs. Moreover, by pruning a merged dataset roughly 3.5× the size of GSV-Cities to a comparable scale, our coreset maintains highly competitive performance, achieving 94.5% R@1 on MSLS-val and 97.0% R@1 on Nordland with only NetVLAD. Codes will be made publicly available.
Tong Jin, Yunpeng Liu, Shuyu Hu +3
Shenyang Institute of Automation, Chinese Academy of Sciences, Shenyang 110016, China · University of Chinese Academy of Sciences, Beijing 100049, China · Tsinghua Shenzhen International Graduate School, Tsinghua University, Shenzhen 518071, China +1