Single Domain Generalization for Crowd Counting

Zhuoxuan Peng, Shueng-Han Gary Chan
2/9/2026

No official code found. Best implementation: Shimmer93/MPCount (98 stars, Apache-2.0, last commit 2025-03-31).

Abstract

Due to its promising results, density map regression has been widely employed for image-based crowd counting. The approach, however, often suffers from severe performance degradation when tested on data from unseen scenarios, the so-called “domain shift” problem. To address the problem, we investigate in this work single domain generalization (SDG) for crowd counting. The existing SDG approaches are mainly for image classification and segmentation, and can hardly be extended to our case due to its regression nature and label ambiguity (i.e., ambiguous pixel-level ground truths). We propose MPCount, a novel effective SDG approach even for narrow source distribution. MPCount stores diverse density values for density map regression and reconstructs domain-invariant features by means of only one memory bank, a content error mask and attention consistency loss. By partitioning the image into grids, it employs patch-wise classification as an auxiliary task to mitigate label ambiguity. Through extensive experiments on different datasets, MPCount is shown to significantly improve counting accuracy compared to the state of the art under diverse scenarios unobserved in the training data characterized by narrow source distribution. Code is availablex at https://github.com/Shimmer93/MPCount.

View on arXivView PDF

Code Implementations(1)

Shimmer93/MPCountCommunity62%
Apache-2.0

Official repo for CVPR2024 paper "Single Domain Generalization for Crowd Counting"

988PythonMar 9, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{peng2026single,
  title  = {Single Domain Generalization for Crowd Counting},
  author = {Zhuoxuan Peng and Shueng-Han Gary Chan},
  year   = {2026},
  eprint = {2403.09124},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2403.09124},
  journal = {CVPR 2024 2024}
}

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/2403.09124.svg)](https://codeofpaper.com/paper/2403.09124)

Discussion