Learning Spatial Similarity Distribution for Few-shot Object Counting

CV ODBO ZSFSR
2024年05月20日
少样本物体计数旨在计算查询图像中属于给定范例图像相同类别的物体数量。现有方法在二维空间域中计算查询图像和范例图像之间的相似度,并执行回归以获得计数数字。然而,这些方法忽略了范例图像中相似度的空间分布的丰富信息,导致匹配准确性受到重大影响。为解决这个问题,我们提出了一种学习空间相似度分布(SSD)的网络,用于少样本物体计数,该网络保留范例特征的空间结构,并在查询特征和范例特征之间计算4D相似度金字塔,捕获4D相似度空间中每个点的完整分布信息。我们提出了相似度学习模块(SLM),该模块在相似度金字塔上应用高效的中心旋转4D卷积,将不同的相似度分布映射到不同的预测密度值,从而获得准确的计数。此外,我们还引入了特征交叉增强(FCE)模块,以相互增强查询和范例特征,提高特征匹配的准确性。我们的方法在多个数据集上优于现有的最先进方法,包括FSC-147和CARPK。代码可在https://github.com/CBalance/SSD上获得。
Few-shot object counting aims to count the number of objects in a query image that belong to the same class as the given exemplar images. Existing methods compute the similarity between the query image and exemplars in the 2D spatial domain and perform regression to obtain the counting number. However, these methods overlook the rich information about the spatial distribution of similarity on the exemplar images, leading to significant impact on matching accuracy. To address this issue, we propose a network learning Spatial Similarity Distribution (SSD) for few-shot object counting, which preserves the spatial structure of exemplar features and calculates a 4D similarity pyramid point-to-point between the query features and exemplar features, capturing the complete distribution information for each point in the 4D similarity space. We propose a Similarity Learning Module (SLM) which applies the efficient center-pivot 4D convolutions on the similarity pyramid to map different similarity distributions to distinct predicted density values, thereby obtaining accurate count. Furthermore, we also introduce a Feature Cross Enhancement (FCE) module that enhances query and exemplar features mutually to improve the accuracy of feature matching. Our approach outperforms state-of-the-art methods on multiple datasets, including FSC-147 and CARPK. Code is available at https://github.com/CBalance/SSD.
许愿