Object re-identification (ReID) aims to find instances with the same identity as the given probe from a large gallery. Pairwise losses play an important role in training a strong ReID network. Existing pairwise losses densely exploit each instance as an anchor and sample its triplets in a mini-batch. This dense sampling mechanism inevitably introduces positive pairs that share few visual similarities, which can be harmful to the training. To address this problem, we propose a novel loss paradigm termed Sparse Pairwise (SP) loss that only leverages few appropriate pairs for each class in a mini-batch, and empirically demonstrate that it is sufficient for the ReID tasks. Based on the proposed loss framework, we propose an adaptive positive mining strategy that can dynamically adapt to diverse intra-class variations. Extensive experiments show that SP loss and its adaptive variant AdaSP loss outperform other pairwise losses, and achieve state-of-the-art performance across several ReID benchmarks. Code is available at https://github.com/Astaxanthin/AdaSP.
翻译:目标再识别(ReID)的目标是从大型库中找到与给定探针拥有相同身份的实例。成对损失在训练强 ReID 网络方面起着重要作用。现有的成对损失函数利用每个实例作为锚点,并在 mini-batch 中对其进行三元组采样。这种稠密的采样机制不可避免地会引入共享较少视觉相似性的正对,这可能对训练有害。为了解决这个问题,我们提出了一种新的损失范式,称为稀疏成对(SP)损失,它仅利用 mini-batch 中每个类别的少数适当成对,经验证明这已足以支持 ReID 任务。基于所提出的损失框架,我们提出了一种自适应正对挖掘策略,可以动态适应不同的类内变化。广泛的实验表明,SP 损失及其自适应变体 AdaSP 损失优于其他成对损失函数,并在几个 ReID 基准测试中实现了最先进的表现。代码可在 https://github.com/Astaxanthin/Ad aSP 找到。