# Generalized Contrastive Optimization of Siamese Networks for Place Recognition

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

## Key facts

- Cited by 27 papers in the map (data through 14 Oct 2026).
- Builds on 31 of its 76 references that are in the map.
- First posted on arXiv 11 Mar 2021.

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

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [Microsoft COCO: Common Objects in Context](https://mlsanity.com/paper/1405.0312/) (2014)
- [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://mlsanity.com/paper/1409.1556/) (2014)
- [Densely Connected Convolutional Networks](https://mlsanity.com/paper/1608.06993/) (2016)
- [PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation](https://mlsanity.com/paper/1612.00593/) (2016)
- [Aggregated Residual Transformations for Deep Neural Networks](https://mlsanity.com/paper/1611.05431/) (2016)
- [Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics](https://mlsanity.com/paper/1705.07115/) (2017)
- [BDD100K: A Diverse Driving Dataset for Heterogeneous Multitask Learning](https://mlsanity.com/paper/1805.04687/) (2018)
- [NetVLAD: CNN architecture for weakly supervised place recognition](https://mlsanity.com/paper/1511.07247/) (2015)
- [Revisiting Unreasonable Effectiveness of Data in Deep Learning Era](https://mlsanity.com/paper/1707.02968/) (2017)
- [Fine-tuning CNN Image Retrieval with No Human Annotation](https://mlsanity.com/paper/1711.02512/) (2017)
- [CNN Features off-the-shelf: an Astounding Baseline for Recognition](https://mlsanity.com/paper/1403.6382/) (2014)
- [Google Landmarks Dataset v2 -- A Large-Scale Benchmark for Instance-Level Recognition and Retrieval](https://mlsanity.com/paper/2004.01804/) (2020)
- [Patch-NetVLAD: Multi-Scale Fusion of Locally-Global Descriptors for Place Recognition](https://mlsanity.com/paper/2103.01486/) (2021)
- [Geometric Loss Functions for Camera Pose Regression with Deep Learning](https://mlsanity.com/paper/1704.00390/) (2017)
- [Learning 3D Semantic Scene Graphs from 3D Indoor Reconstructions](https://mlsanity.com/paper/2004.03967/) (2020)
- [PointNetVLAD: Deep Point Cloud Based Retrieval for Large-Scale Place Recognition](https://mlsanity.com/paper/1804.03492/) (2018)
- [Learning with Average Precision: Training Image Retrieval with a Listwise Loss](https://mlsanity.com/paper/1906.07589/) (2019)
- [Weakly-Supervised Semantic Segmentation via Sub-category Exploration](https://mlsanity.com/paper/2008.01183/) (2020)
- [Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition](https://mlsanity.com/paper/1904.01189/) (2019)
- [On the Performance of ConvNet Features for Place Recognition](https://mlsanity.com/paper/1501.04158/) (2015)
- [Aggregating Deep Convolutional Features for Image Retrieval](https://mlsanity.com/paper/1510.07493/) (2015)
- [Benchmarking Image Retrieval for Visual Localization](https://mlsanity.com/paper/2011.11946/) (2020)
- [Deep Metric Learning Beyond Binary Supervision](https://mlsanity.com/paper/1904.09626/) (2019)
- [Convolutional Neural Network-based Place Recognition](https://mlsanity.com/paper/1411.1509/) (2014)
- [Joint Learning of Intrinsic Images and Semantic Segmentation](https://mlsanity.com/paper/1807.11857/) (2018)
- [Embedding Deep Metric for Person Re-identication A Study Against Large Variations](https://mlsanity.com/paper/1611.00137/) (2016)
- [TrimBot2020: an outdoor robot for automatic gardening](https://mlsanity.com/paper/1804.01792/) (2018)
- [Place recognition in gardens by learning visual representations: data set and benchmark analysis](https://mlsanity.com/paper/1906.12151/) (2019)
- [Three for one and one for three: Flow, Segmentation, and Surface Normals](https://mlsanity.com/paper/1807.07473/) (2018)

## Built on by (most cited first, 27 of 27)

- [GSV-Cities: Toward Appropriate Supervised Visual Place Recognition](https://mlsanity.com/paper/2210.10239/) (2022)
- [Towards Seamless Adaptation of Pre-trained Models for Visual Place Recognition](https://mlsanity.com/paper/2402.14505/) (2024)
- [(LC)2: LiDAR-Camera Loop Constraints For Cross-Modal Place Recognition](https://mlsanity.com/paper/2304.08660/) (2023)
- [On the Estimation of Image-matching Uncertainty in Visual Place Recognition](https://mlsanity.com/paper/2404.00546/) (2024)
- [SelaVPR++: Towards Seamless Adaptation of Foundation Models for Efficient Place Recognition](https://mlsanity.com/paper/2502.16601/) (2025)
- [Spectral, Probabilistic, and Deep Metric Learning: Tutorial and Survey](https://mlsanity.com/paper/2201.09267/) (2022)
- [AANet: Aggregation and Alignment Network with Semi-hard Positive Sample Mining for Hierarchical Place Recognition](https://mlsanity.com/paper/2310.05184/) (2023)
- [Contrastive Learning for Unsupervised Radar Place Recognition](https://mlsanity.com/paper/2110.02744/) (2021)
- [Tightly Coupled Learning Strategy for Weakly Supervised Hierarchical Place Recognition](https://mlsanity.com/paper/2202.06470/) (2022)
- [Self-Supervised Domain Calibration and Uncertainty Estimation for Place Recognition](https://mlsanity.com/paper/2203.04446/) (2022)
- [PICL: Physics Informed Contrastive Learning for Partial Differential Equations](https://mlsanity.com/paper/2401.16327/) (2024)
- [Explicit Interaction for Fusion-Based Place Recognition](https://mlsanity.com/paper/2402.17264/) (2024)
- [Through the Lens of Doubt: Robust and Efficient Uncertainty Estimation for Visual Place Recognition](https://mlsanity.com/paper/2510.13464/) (2025)
- [CoPR: Towards Accurate Visual Localization With Continuous Place-descriptor Regression](https://mlsanity.com/paper/2304.07426/) (2023)
- [Discriminative and Semantic Feature Selection for Place Recognition towards Dynamic Environments](https://mlsanity.com/paper/2103.10023/) (2021)
- [InstaIndoor and Multi-modal Deep Learning for Indoor Scene Recognition](https://mlsanity.com/paper/2112.12409/) (2021)
- [Reuse your features: unifying retrieval and feature-metric alignment](https://mlsanity.com/paper/2204.06292/) (2022)
- [Hierarchical place recognition with omnidirectional images and curriculum learning-based loss functions](https://mlsanity.com/paper/2404.14117/) (2024)
- [About Explicit Variance Minimization: Training Neural Networks for Medical Imaging With Limited Data Annotations](https://mlsanity.com/paper/2105.14117/) (2021)
- [Points2Polygons: Context-Based Segmentation from Weak Labels Using Adversarial Networks](https://mlsanity.com/paper/2106.02804/) (2021)
- [GRM: Gradient Rectification Module for Visual Place Retrieval](https://mlsanity.com/paper/2204.10972/) (2022)
- [SuperGF: Unifying Local and Global Features for Visual Localization](https://mlsanity.com/paper/2212.13105/) (2022)
- [An experimental evaluation of Siamese Neural Networks for robot localization using omnidirectional imaging in indoor environments](https://mlsanity.com/paper/2407.10536/) (2024)
- [Visual Re-Ranking with Non-Visual Side Information](https://mlsanity.com/paper/2504.11134/) (2025)
- [Visual Place Recognition for Large-Scale UAV Applications](https://mlsanity.com/paper/2507.15089/) (2025)
- [The Overlooked Value of Test-time Reference Sets in Visual Place Recognition](https://mlsanity.com/paper/2510.03751/) (2025)
- [Breaking D'ej`a Vu: Independent Auditing of Visual Place Recognition through Vision-Language Reasoning](https://mlsanity.com/paper/2607.12818/) (2026)

## Abstract (arXiv)

Visual place recognition is a challenging task in computer vision and a key component of camera-based localization and navigation systems. Recently, Convolutional Neural Networks (CNNs) achieved high results and good generalization capabilities. They are usually trained using pairs or triplets of images labeled as either similar or dissimilar, in a binary fashion. In practice, the similarity between two images is not binary, but continuous. Furthermore, training these CNNs is computationally complex and involves costly pair and triplet mining strategies. We propose a Generalized Contrastive loss (GCL) function that relies on image similarity as a continuous measure, and use it to train a siamese CNN. Furthermore, we present three techniques for automatic annotation of image pairs with labels indicating their degree of similarity, and deploy them to re-annotate the MSLS, TB-Places, and 7Scenes datasets. We demonstrate that siamese CNNs trained using the GCL function and the improved annotations consistently outperform their binary counterparts. Our models trained on MSLS outperform the state-of-the-art methods, including NetVLAD, NetVLAD-SARE, AP-GeM and Patch-NetVLAD, and generalize well on the Pittsburgh30k, Tokyo 24/7, RobotCar Seasons v2 and Extended CMU Seasons datasets. Furthermore, training a siamese network using the GCL function does not require complex pair mining. We release the source code at https://github.com/marialeyvallina/generalized_contrastive_loss.
