HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Few-shot Object Counting with Similarity-Aware Feature Enhancement

Zhiyuan You Kai Yang Wenhan Luo Xin Lu Lei Cui Xinyi Le

Few-shot Object Counting with Similarity-Aware Feature Enhancement

Abstract

This work studies the problem of few-shot object counting, which counts the number of exemplar objects (i.e., described by one or several support images) occurring in the query image. The major challenge lies in that the target objects can be densely packed in the query image, making it hard to recognize every single one. To tackle the obstacle, we propose a novel learning block, equipped with a similarity comparison module and a feature enhancement module. Concretely, given a support image and a query image, we first derive a score map by comparing their projected features at every spatial position. The score maps regarding all support images are collected together and normalized across both the exemplar dimension and the spatial dimensions, producing a reliable similarity map. We then enhance the query feature with the support features by employing the developed point-wise similarities as the weighting coefficients. Such a design encourages the model to inspect the query image by focusing more on the regions akin to the support images, leading to much clearer boundaries between different objects. Extensive experiments on various benchmarks and training setups suggest that we surpass the state-of-the-art methods by a sufficiently large margin. For instance, on a recent large-scale FSC-147 dataset, we surpass the state-of-the-art method by improving the mean absolute error from 22.08 to 14.32 (35%$\uparrow$). Code has been released in https://github.com/zhiyuanyou/SAFECount.

Code Repositories

zhiyuanyou/SAFECount
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
crowd-counting-on-shanghaitech-aSAFECount
MAE: 73.70
crowd-counting-on-shanghaitech-bSAFECount
MAE: 9.98
object-counting-on-carpkSAFECount
MAE: 5.33
RMSE: 7.04
object-counting-on-fsc147SAFECount
MAE(test): 14.32
MAE(val): 15.28
RMSE(test): 85.54
RMSE(val): 47.20

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp