Image retrieval targets to find images from a database that are visually similar to the query image. Two-stage methods following retrieve-and-rerank paradigm have achieved excellent performance, but their separate local and global modules are inefficient to real-world applications. To better trade-off retrieval efficiency and accuracy, some approaches fuse global and local feature into a joint representation to perform single-stage image retrieval. However, they are still challenging due to various situations to tackle, $e.g.$, background, occlusion and viewpoint. In this work, we design a Coarse-to-Fine framework to learn Compact Discriminative representation (CFCD) for end-to-end single-stage image retrieval-requiring only image-level labels. Specifically, we first design a novel adaptive softmax-based loss which dynamically tunes its scale and margin within each mini-batch and increases them progressively to strengthen supervision during training and intra-class compactness. Furthermore, we propose a mechanism which attentively selects prominent local descriptors and infuse fine-grained semantic relations into the global representation by a hard negative sampling strategy to optimize inter-class distinctiveness at a global scale. Extensive experimental results have demonstrated the effectiveness of our method, which achieves state-of-the-art single-stage image retrieval performance on benchmarks such as Revisited Oxford and Revisited Paris. Code is available at https://github.com/bassyess/CFCD.
翻译:图像检索旨在从数据库中查找与查询图像视觉相似的图像。遵循检索-重排范式的两阶段方法已取得优异性能,但其分离的局部与全局模块在实际应用中效率欠佳。为更好平衡检索效率与准确性,部分方法将全局与局部特征融合为联合表示以执行单阶段图像检索。然而,由于需应对背景、遮挡与视角等各类复杂情况,该方法仍面临挑战。本文设计了从粗到精的紧凑判别表示学习框架(CFCD),用于端到端的单阶段图像检索——该框架仅需图像级标签。具体而言,我们首先提出一种新型自适应softmax损失函数,该函数可在每个小批量内动态调整尺度与边界参数,并通过渐进式增强来强化训练过程中的监督信号与类内紧凑性。此外,我们设计了一种注意力机制,可突出选择重要局部描述符,并通过困难负样本采样策略将细粒度语义关系注入全局表示,以在全局尺度上优化类间区分性。大量实验证明了该方法的有效性,其在Revisited Oxford与Revisited Paris等基准数据集上取得了最先进的单阶段图像检索性能。代码开源地址:https://github.com/bassyess/CFCD。