GCA-SUNet: A Gated Context-Aware Swin-UNet for Exemplar-Free Counting

Yuzhe Wu, Yipeng Xu, Tianyu Xu, Jialu Zhang, Jianfeng Ren +1 more
9/18/2024
cs.CVcs.AI

Official code: Amordia/GCA-SUNet (4 stars, MIT, last commit 2025-08-19).

Abstract

Exemplar-Free Counting aims to count objects of interest without intensive annotations of objects or exemplars. To achieve this, we propose a Gated Context-Aware Swin-UNet (GCA-SUNet) to directly map an input image to the density map of countable objects. Specifically, a set of Swin transformers form an encoder to derive a robust feature representation, and a Gated Context-Aware Modulation block is designed to suppress irrelevant objects or background through a gate mechanism and exploit the attentive support of objects of interest through a self-similarity matrix. The gate strategy is also incorporated into the bottleneck network and the decoder of the Swin-UNet to highlight the features most relevant to objects of interest. By explicitly exploiting the attentive support among countable objects and eliminating irrelevant features through the gate mechanisms, the proposed GCA-SUNet focuses on and counts objects of interest without relying on predefined categories or exemplars. Experimental results on the real-world datasets such as FSC-147 and CARPK demonstrate that GCA-SUNet significantly and consistently outperforms state-of-the-art methods. The code is available at https://github.com/Amordia/GCA-SUNet.

View on arXivView PDF

Code Implementations(1)

Amordia/GCA-SUNetOfficial100%
MIT

Official implementation of GCA-SUNet 🚀. A Gated Context-Aware Swin-UNet for Exemplar-Free Counting, which counts objects of interest without requiring any exemplars.

40PythonMar 24, 20251 years agoMIT

Similar Papers

Cite this paper

@article{wu2024gcasunet,
  title  = {GCA-SUNet: A Gated Context-Aware Swin-UNet for Exemplar-Free Counting},
  author = {Yuzhe Wu and Yipeng Xu and Tianyu Xu and Jialu Zhang and Jianfeng Ren and Xudong Jiang},
  year   = {2024},
  eprint = {2409.12249},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.12249v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.12249.svg)](https://codeofpaper.com/paper/2409.12249)

Discussion