Papers › Few-shot Object Counting with Similarity-Aware Feature Enhancement
Few-shot Object Counting with Similarity-Aware Feature Enhancement
Zhiyuan You, Kai Yang, Wenhan Luo, Xin Lu, Lei Cui, Xinyi Le
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%↑). Code has been released in https://github.com/zhiyuanyou/SAFECount.
In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
Code
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
Not run by Syntology. Nothing on this page verifies that the listed code works.
Tasks
Results from the paper archive 2025-07-28
| Task | Dataset | Model | Metric | Value | Rank at snapshot | Leaderboard | Report |
|---|---|---|---|---|---|---|---|
| Crowd Counting | ShanghaiTech A | SAFECount | MAE | 73.70 | #30 of 35 | Archive leaderboard | report |
| Crowd Counting | ShanghaiTech B | SAFECount | MAE | 9.98 | #21 of 32 | Archive leaderboard | report |
| Object Counting | CARPK | SAFECount | MAE | 5.33 | #3 of 15 | Archive leaderboard | report |
| Object Counting | CARPK | SAFECount | RMSE | 7.04 | #3 of 15 | Archive leaderboard | report |
| Object Counting | FSC147 | SAFECount | MAE(test) | 14.32 | #12 of 19 | Archive leaderboard | report |
| Object Counting | FSC147 | SAFECount | MAE(val) | 15.28 | #12 of 19 | Archive leaderboard | report |
| Object Counting | FSC147 | SAFECount | RMSE(test) | 85.54 | #12 of 19 | Archive leaderboard | report |
| Object Counting | FSC147 | SAFECount | RMSE(val) | 47.20 | #12 of 19 | Archive leaderboard | report |
Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections