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.
翻译:视觉地点识别是计算机视觉领域的一项具有挑战性的任务,也是基于摄像头的定位与导航系统的关键组成部分。近年来,卷积神经网络(CNN)取得了较高的性能与良好的泛化能力。这类网络通常采用二元分类方式,使用标记为“相似”或“不相似”的图像对或三元组进行训练。然而在实际应用中,两张图像之间的相似度并非二元离散,而是连续变化的。此外,训练这些CNN的计算复杂度高,且需要昂贵的成对与三元组挖掘策略。我们提出一种广义对比损失(GCL)函数,该函数将图像相似度作为连续度量,并用于训练孪生CNN。同时,我们提出了三种自动标注图像对相似度标签的技术,并将其应用于MSLS、TB-Places和7Scenes数据集的重新标注。实验表明,使用GCL函数和改进标注训练的孪生CNN,其性能始终优于二元训练方法。基于MSLS训练的模型超越了包括NetVLAD、NetVLAD-SARE、AP-GeM和Patch-NetVLAD在内的现有最优方法,并在Pittsburgh30k、Tokyo 24/7、RobotCar Seasons v2和Extended CMU Seasons数据集上表现出良好的泛化能力。此外,使用GCL函数训练孪生网络无需复杂的成对挖掘策略。我们已在https://github.com/marialeyvallina/generalized_contrastive_loss 公开源代码。