Fourier transform-based single domain generalization for crowd counting
摘要
Accurate crowd counting is critical for numerous real-world applications. However, domain shift poses a significant barrier to deploying crowd counting models in practical scenarios due to the discrepancy between training and target domains. This paper proposes SinCount, a novel crowd counting framework designed for the Single-source Domain Generalization (SDG) setting, capable of generalizing to unseen domains. SinCount introduces a task-frequency alignment mechanism, directing high-frequency cues toward fine-grained density regression while allocating low-frequency cues to region-level classification to mitigate domain shift. Specifically, we develop a frequency-specific feature extraction module to extract high-frequency and low-frequency features. Subsequently, a dual-attention strategy is devised to embed high-frequency features via spatial attention for the regression branch, while modulating low-frequency features via channel attention for the classification branch. Moreover, an instance normalization mask and an attention consistency loss are incorporated to suppress domain-specific noise and stabilize feature learning. Evaluations across multiple benchmark datasets demonstrate that our method achieves competitive performance compared to state-of-the-art SDG approaches. The code is publicly available at https://github.com/Twiwq/SinCount.