MscaVPR: Multi-Scale Coordinate Attention Network for Robust Visual Place Recognition Authors: Xiaohan Gao, Zhinong Zhong, Yongjian Tan, Ning Jing, Anran Yang, Qingren Jia Published: 2026 ABSTRACT Visual place recognition (VPR) aims to localize a query image by matching its visual representation against a geotagged database. One major challenge in VPR is to learn place representations that remain robust under appearance changes, viewpoint variations, and perceptual aliasing. However, existing VPR methods still show limitations in adaptive multi-scale feature fusion and viewpoint-aware training supervision, which may hinder robustness under severe viewpoint changes. In this paper, we propose MscaVPR, a VPR framework that combines multi-scale feature enhancement with azimuth-aware training. Specifically, a Multi-Scale Spatial Pyramid Attention (MSPA) module is incorporated to aggregate regional features across different spatial scales, and Coordinate Attention (CA) is used to encode positional cues for spatially refined feature learning. To further enhance viewpoint robustness, we design an azimuth-guided training strategy that selects hard positive samples with significant viewpoint discrepancies and optimizes them using an azimuth-aware auxiliary loss function.Experimental results on multiple benchmark datasets indicate that MscaVPR generally outperforms the strong baseline and demonstrates improved performance under challenging conditions. In particular, Recall@1 is improved by 2.1%, 1.9%, and 1.9% on the AmsterTime, SVOX-Night, and SVOX-Sun datasets, respectively. The results demonstrate that explicitly incorporating azimuth cues provides an effective complement to existing multi-scale and attention-based VPR methods. 1. Introduction Visual place recognition (VPR) is a fundamental task in computer vision and robotics, aiming to identify a geographical location solely from the visual features of an image, without the aid of GPS information [1]. This task is typically formulated as an image retrieval problem [2], in which the goal is to find images in a database that are visually similar to a given query without requiring complex 3D reconstruction, thus enabling relatively direct and efficient localization. VPR has applications in virtual reality [3], augmented reality [4], autonomous vehicles [5], environmental exploration [6], robotic localization [7], and smart cities [8], where robust performance under varying environmental conditions is critical. The standard image-retrieval-based VPR pipeline consists of two main stages: extracting image descriptors to construct a searchable feature database and retrieving the most similar database images for a given query according to descriptor similarity [9,10]. As a result, the quality of feature representation largely determines the final retrieval performance. However, learning robust place representations in real-world outdoor environments remains challenging as a result of to three tightly coupled factors: appearance variations caused by illumination, season, and weather changes; viewpoint variations induced by changes in camera orientation and position; and perceptual aliasing, where different places exhibit highly similar visual patterns [2]. Examples of these challenging scenarios are shown in Figure 1. To address these challenges, recent VPR methods have increasingly relied on deep visual representations. CNN-based approaches improve robustness through hierarchical feature extraction and global aggregation, such as NetVLAD [1], and GeM [11], while later methods further enhance discriminability via regional modeling and multi-scale aggregation. More recently, Transformer-based architectures have shown a strong ability to capture long-range dependencies and contextual relationships, with attention-based methods such as TransVPR [12] and CricaVPR [13] achieving notable progress in challenging VPR scenarios. Despite these advances, two limitations remain. First, regional cues in existing methods are often integrated in a fixed or only weakly adaptive manner, with limited explicit modeling of spatial positional information, which may hinder the full exploitation of complementary cues across spatial scales and viewpoints. Second, most methods still adopt generic metric learning objectives and conventional positive-pair construction, without explicitly leveraging viewpoint-related cues such as image azimuth. Consequently, hard positive pairs with large directional discrepancies are often insufficiently emphasized during training, weakening robustness to severe viewpoint changes. These limitations motivate us to improve viewpoint robustness from both representation learning and training supervision, where azimuth metadata provide a lightweight and practical cue for guiding viewpoint-aware optimization. Building upon the strong CricaVPR framework [13], this paper presents MscaVPR, which improves viewpoint-robust visual place recognition through the joint design of feature enhancement and azimuth-aware training. The main contributions of this work can be summarized as follows:(1)We enhance place representation with multi-scale and coordinate-aware feature modeling. Specifically, a Multi-Scale Spatial Pyramid Attention (MSPA) module [14] is introduced to adaptively aggregate regional features across different spatial scales, and Coordinate Attention (CA) [15] is incorporated to encode positional cues and refine spatial responses.(2)We propose an azimuth-guided training strategy to explicitly improve robustness to viewpoint changes. By leveraging azimuth metadata, the proposed strategy preferentially selects hard positive samples with larger viewpoint discrepancies and further optimizes them through an azimuth-aware auxiliary loss function.(3)Extensive experiments on both standard and challenging benchmarks verify the effectiveness of the proposed method and demonstrate that explicitly incorporating azimuth cues consistently improves viewpoint robustness over a strong baseline. (1)We enhance place representation with multi-scale and coordinate-aware feature modeling. Specifically, a Multi-Scale Spatial Pyramid Attention (MSPA) module [14] is introduced to adaptively aggregate regional features across different spatial scales, and Coordinate Attention (CA) [15] is incorporated to encode positional cues and refine spatial responses. We enhance place representation with multi-scale and coordinate-aware feature modeling. Specifically, a Multi-Scale Spatial Pyramid Attention (MSPA) module [14] is introduced to adaptively aggregate regional features across different spatial scales, and Coordinate Attention (CA) [15] is incorporated to encode positional cues and refine spatial responses. (2)We propose an azimuth-guided training strategy to explicitly improve robustness to viewpoint changes. By leveraging azimuth metadata, the proposed strategy preferentially selects hard positive samples with larger viewpoint discrepancies and further optimizes them through an azimuth-aware auxiliary loss function. We propose an azimuth-guided training strategy to explicitly improve robustness to viewpoint changes. By leveraging azimuth metadata, the proposed strategy preferentially selects hard positive samples with larger viewpoint discrepancies and further optimizes them through an azimuth-aware auxiliary loss function. (3)Extensive experiments on both standard and challenging benchmarks verify the effectiveness of the proposed method and demonstrate that explicitly incorporating azimuth cues consistently improves viewpoint robustness over a strong baseline. Extensive experiments on both standard and challenging benchmarks verify the effectiveness of the proposed method and demonstrate that explicitly incorporating azimuth cues consistently improves viewpoint robustness over a strong baseline. 2. Related Work 2.1. Traditional Place Recognition with Handcrafted Features Early VPR methods were primarily built on handcrafted local features, such as SIFT [16], SURF [17], HOG [18], and ORB [19]. These descriptors were typically combined with global encoding schemes, including Bag-of-Words (BoW) [20], Fisher Vector (FV) [21], and Vector of Locally Aggregated Descriptors (VLAD) [22], to form compact image-level representations suitable for large-scale retrieval. Such methods established the early foundation of place recognition by enabling efficient matching across large reference databases. Despite their effectiveness in controlled environments, methods based on handcrafted features are inherently limited by their sensitivity to photometric and geometric variations. Changes in illumination, weather, season, or camera viewpoint often cause local descriptors to become unstable or ambiguous. Moreover, these methods mainly rely on bottom-up matching of local structures and therefore lack robust semantic understanding of the scene as a whole, which makes them particularly vulnerable to perceptual aliasing in environments with repetitive visual patterns. These limitations motivated the transition to data-driven deep representations. 2.2. CNN-Based Learned Global Representations The emergence of deep convolutional neural networks shifted VPR from hand-engineered pipelines toward end-to-end feature learning. CNN backbones such as VGG [23] and ResNet [24] enabled hierarchical visual representations that are substantially more robust to appearance changes than handcrafted descriptors are. A major milestone in this direction was NetVLAD [1], which introduced a differentiable VLAD layer on top of convolutional features, allowing the entire retrieval pipeline to be optimized directly for place recognition. This framework demonstrated the effectiveness of jointly learning local feature extraction and global descriptor aggregation. Patch-NetVLAD [25] further improved robustness by incorporating patch-level residual aggregation, preserving local details under appearance and viewpoint changes. Subsequent CNN-based research mainly focused on more effective aggregation and training strategies. MixVPR [26] replaced residual-based aggregation with MLP-based feature mixing, enabling efficient global descriptor learning through iterative spatial and channel interaction. CosPlace [27] adopted a classification-based training scheme that avoids explicit positive–negative pair construction, greatly improving training efficiency. To enhance viewpoint robustness, GeoWarp [28] learned geometric transformations to align features across camera positions, and EigenPlaces [10] encoded viewpoint invariance into global descriptors through contrastive learning on the large-scale SF-XL dataset [27]. Despite these advances, multi-scale cues in CNN-based VPR are often integrated in an implicit or relatively fixed manner, while adaptive cross-scale fusion of hierarchical features remains limited. 2.3. Attention-Based and Transformer-Based VPR Attention-based methods further advanced VPR by improving the modeling of discriminative regions and long-range contextual dependencies. Early studies showed that Vision Transformers (ViTs) were able to outperform CNN-based descriptors for image retrieval [29], highlighting the benefit of global context modeling for place recognition. TransVPR [12] used multi-level attention to enhance discriminative patches while jointly capturing local and global cues. BoQ [30] formulated global representation learning as query-based cross-attention aggregation, producing compact and discriminative descriptors with high efficiency. Moving beyond single-image reasoning, CricaVPR [13] introduced cross-image correlation awareness to exploit complementary information across multiple views of the same place, but its emphasis is primarily on inter-image relational modeling rather than explicit cross-scale self-adaptation fusion within image representations. ClusVPR [31] further improved region selection by using clustering-based weighted Transformers to emphasize representative and diverse image regions, enhancing robustness to viewpoint changes and scene complexity. More recently, EffoVPR [32] showed that pretrained vision foundation models already encode highly transferable cues for VPR, and this model leveraged internal Transformer features and attention maps within a lightweight retrieval framework to achieve strong performance under challenging appearance and viewpoint changes. However, coordinate-aware spatial reweighting is still less explored in existing attention-based VPR methods, and the preservation of directional positional information during long-range multi-scale interactions remains limited. 3. Methodology 3.1. Network Architecture Herein, to improve visual representation learning under appearance and viewpoint variations, we develop MscaVPR as an enhanced variant of CricaVPR [13]. As shown in Figure 2, the framework preserves the backbone feature extraction and cross-image correlation pipeline of CricaVPR, while strengthening the feature aggregation stage by introducing MSPA-based multi-scale regional aggregation and coordinate-aware refinement. Specifically, the Multi-Scale Spatial Pyramid Attention (MSPA) module [14] is integrated into each regional aggregation branch to enhance structural representation at different spatial scales, and Coordinate Attention (CA) [15] is employed to encode positional cues among regional descriptors before cross-image encoding. Given an input image, DINOv2 ViT-B/14 [33] is used as the backbone to extract one CLS token and a set of patch tokens. The CLS token serves as a global representation, while the patch tokens preserve local spatial information. The patch tokens are reshaped into a 2D feature map F∈RB×D×H×W and partitioned into 2×2 and 3×3 spatial grids, yielding 4 and 9 sub-regions, respectively. After independent MSPA processing and pooling, these sub-regions produce 13 regional descriptors of dimension D, which are concatenated into RB×D×13 and further combined with the CLS token to form the image-level feature sequence RB×D×14. This sequence is reshaped into a pseudo-spatial tensor RB×D×2×7 and refined by the CA module to preserve positional sensitivity and emphasize informative structural regions while suppressing background interference. The refined output is then reshaped back to RB×D×14 and processed by the cross-image encoder inherited from CricaVPR to model inter-image correlations. Finally, the output tokens are flattened into RB×(D·14) and L2-normalized to obtain the global descriptor for image retrieval. 3.2. Feature Aggregation Based on Multi-Scale Spatial Pyramid Attention To exploit multi-scale spatial information during feature aggregation, we incorporate the Multi-Scale Spatial Pyramid Attention (MSPA) module proposed in [14] into MscaVPR. In the original work, MSPA is used to replace the 3×3 convolution in the bottleneck residual blocks of CNN backbones. In contrast, we adapt it to the regional aggregation stage of the VPR pipeline, where it refines the partitioned patch features at each spatial scale before regional pooling. The architecture of MSPA is illustrated in Figure 3. Following Ref. [14], MSPA contains three components: Hierarchical Phantom Convolution (HPC), Spatial Pyramid Recalibration (SPR), and Softmax-based channel recalibration. The HPC module splits the input feature map along the channel dimension and processes each group through hierarchical residual-like convolutional paths, allowing spatial responses with different receptive fields to be aggregated. The SPR module combines global average pooling and local average pooling to capture complementary contextual information and incorporates lightweight pointwise convolutions to learn channel relationships. The resulting channel attention weights are normalized by Softmax to model long-range channel dependencies and are then applied to the corresponding feature subsets for recalibration. In MscaVPR, MSPA is applied independently to the regional feature of each spatial sub-region. For both the 2×2 and 3×3 branches, the output of MSPA retains the same feature dimension as its input, so that each region can be consistently transformed into a 768-dimensional descriptor after GeM pooling. In this way, the multi-scale aggregation branch yields regional descriptors with a unified embedding space, which are then concatenated with the CLS token to form the image-level feature sequence for subsequent coordinate-aware refinement and cross-image encoding. 3.3. Coordinate-Aware Feature Refinement After multi-scale aggregation, we apply Coordinate Attention (CA) [15] to refine the concatenated image feature sequence before cross-image encoding. CA embeds positional information into channel attention by decomposing 2D global pooling into two one-dimensional encoding processes along the horizontal and vertical directions. This design allows the module to capture long-range dependencies along one spatial direction while preserving positional cues along the other. In MscaVPR, CA is used as a lightweight coordinate-aware recalibration module for the concatenated multi-scale regional tokens. The structure of CA is shown in Figure 4. Given the concatenated feature sequence, we first reshape it into a pseudo-spatial grid X∈RC×H×W, where H=2 and W=7 in our implementation. CA aggregates features along the two spatial directions using 1D average pooling:(1)zch(h)=1W∑i=1Wxc(h,i)(2)zcw(w)=1H∑j=1Hxc(j,w) The two direction-aware descriptors are concatenated and transformed by a shared 1×1 convolution, followed by normalization and non-linear activation. The transformed feature is then split into two branches and projected to generate height-aware and width-aware attention maps, denoted as gh and gw. The output of CA is computed as(3)yc(i,j)=xc(i,j)×gch(i)×gcw(j) The refined feature grid is finally reshaped back into a token sequence and fed into the cross-image Transformer encoder inherited from CricaVPR. This coordinate-aware refinement preserves lightweight computation while providing position-sensitive regional representations for subsequent inter-image correlation modeling. 3.4. Azimuth-Guided Positive-Pair Selection Images captured at the same geographic location may still exhibit substantial visual differences when their viewing directions differ significantly. Although such samples remain valid positives, they are generally more challenging than those with similar azimuths. To exploit this property during training, we incorporate the azimuth information provided by the northdeg field in the street-view dataset and use it to preferentially select hard positive samples. For each image, the raw azimuth annotation is first normalized to the range [0°, 360°) using a modulo-360° operation. Given two images i and j captured at the same location, their circular azimuth difference is defined as(4)dij=minϕi−ϕj,360°−ϕi−ϕj where ϕi and ϕj denote the normalized azimuth angles of samples i and j, respectively. To further account for the approximate 180° ambiguity caused by sensor noise, heading misalignment, or annotation inconsistency, we map the angular difference into the effective range of [0°, 90°] as follows:(5)d˜ij=min(dij,180°−dij) This formulation reduces the influence of inconsistent directional annotations while preserving the relative viewpoint discrepancy between two images. As summarized in Algorithm 1, hard positive selection is performed within each place-level image group during training. Specifically, we first randomly sample K images from the same geographic location, where K is determined by img_per_place, and denote their azimuth annotations as {ϕ1,ϕ2,…,ϕK}. Based on the pairwise effective azimuth differences d˜ij, we construct a difference matrix and consider only its upper-triangular entries to avoid duplicate pairs. All candidate pairs are then ranked by d˜ij, and the top pairs M=⌊K/2⌋ with the largest azimuth differences are selected as hard positive pairs. The image indices involved in these selected pairs are merged to form the hard-positive subset. If the number of unique selected images is smaller than K, the remaining positions are filled by randomly sampling from the unselected images, so that a fixed number of training images are retained for each place. In our implementation, K=4, and thus, the two pairs with the largest azimuth differences are selected within each place-level group. Algorithm 1 Azimuth-guided hard positive sampling within a placeRequire: Place-level image set S, number of sampled images K Ensure: A selected image subset Shard of size K 1:Randomly sample K images from S to obtain {I1,…,IK} 2:Extract azimuth annotations {ϕ1,…,ϕK} 3:Normalize azimuths by ϕi←ϕimod180° 4:for i=1 to K do 5: for j=i+1 to K do 6: Compute dij←|ϕi−ϕj| 7: Compute d˜ij←min(dij,180°−dij) 8: end for 9:end for10:Collect all upper-triangular pairs (i,j) and their scores d˜ij11:Rank all pairs by d˜ij in descending order12:Select the top M=⌊K/2⌋ pairs13:Merge the image indices from the selected pairs into an index set I14:if |I|