Granular Ball Guided Stable Latent Domain Discovery for Domain-General Crowd Counting
Organizations: Chongqing University of Posts and Telecommunications, Chongqing, China · Chongqing Ant Consumer Finance Co., Ltd., Chongqing, China
Abstract
Single-source domain generalization for crowd counting is highly challenging because a single labeled source domain may contain heterogeneous latent domains, while unseen target domains often exhibit severe distribution shifts. A central issue is stable latent domain discovery: directly performing flat clustering on evolving sample-level latent features is easily disturbed by feature noise, outliers, and representation drift, leading to unreliable pseudo-domain assignments and weakened domain-structured learning. To address this problem, we propose a granular ball guided stable latent domain discovery framework for domain-general crowd counting. The proposed method first groups samples into compact local granular balls and then clusters granular ball centers as representatives to infer pseudo-domains, thereby converting direct sample-level clustering into a hierarchical representative-based clustering process. This design produces more stable and semantically consistent pseudo-domain assignments. On top of the discovered latent domains, we develop a two-branch learning framework that improves transferable semantic representations via semantic codebook re-encoding and captures domain-specific appearance variations through a style branch, thereby alleviating semantic--style entanglement under domain shifts. Extensive experiments on ShanghaiTech A/B, UCF_QNRF, and NWPU-Crowd under a strict no-adaptation protocol verify the effectiveness of the proposed method and show strong generalization ability, especially in transfer settings with large domain gaps.
Figures & tables
| Source | SHA | SHB | QNRF | ||||||||||
| Target | SHB | QNRF | SHA | QNRF | SHA | SHB | |||||||
| Method | Publication | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE |
| DMCount [ 3 ] | NeurIPS’20 | 23.1 | 34.9 | 134.4 | 252.1 | 143.9 | 239.6 | 203.0 | 386.1 | 73.4 | 135.1 | 14.3 | 27.5 |
| D2CNet [ 38 ] | TIP’21 | 21.6 | 34.6 | 126.8 | 245.5 | 164.5 | 286.4 | 267.5 | 486.0 | – | – | – | – |
| SASNet [ 39 ] | AAAI’21 | 21.3 | 33.2 | 211.2 | 418.6 | 132.4 | 225.6 | 273.5 | 481.3 | 73.9 | 116.4 | 13.0 | 22.1 |
| MAN [ 40 ] | CVPR’22 | 22.1 | 32.8 | 138.8 | 266.3 | 133.6 | 255.6 | 209.4 | 378.8 | 67.1 | 122.1 | 12.5 | 22.2 |
| Source | SHA | SHB | SHA+SHB | |||
| Target | NWPU | |||||
| Method | MAE | MSE | MAE | MSE | MAE | MSE |
| DMCount [ 3 ] | 146.9 | 563.8 | 191.6 | 747.4 | 144.6 | 592.8 |
| SASNet [ 39 ] | 158.8 | 588.0 | 195.7 | 716.8 | 155.3 | 583.6 |
| MAN [ 40 ] | 148.2 | 586.5 | 193.6 | 802.5 | 147.8 | 605.3 |
| DGCC [ 18 ] | 143.1 | 567.6 | 175.0 | 688.6 | 139.6 | 553.6 |
| Source | SHA | SHB | UCF_QNRF | |||||||||
| Target | SHB | QNRF | SHA | QNRF | SHA | SHB | ||||||
| Method | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE |
| Random partition | 12.8 | 23.4 | 119.4 | 218.4 | 120.2 | 210.2 | 169.2 | 307.1 | 68.6 | 114.6 | 14.3 | 27.0 |
| K-means | 12.9 | 24.4 | 119.8 | 219.6 | 122.7 | 220.2 | 166.1 | 295.3 | 68.0 | 111.3 | 13.5 | 25.3 |
| Ours | 11.1 | 15.7 | 108.0 | 197.4 | 97.5 | 171.7 | 160.3 | 298.8 | 64.1 | 103.5 | 13.0 | 21.5 |
| Dataset | Method | ||
| SHA | Random | 90.8 | 33.8 |
| K-means | 270.9 | 110.2 | |
| Ours | 278.0 | 112.7 | |
| SHB | Random | 20.7 | 8.5 |
| K-means | 92.9 | 41.8 | |
| Ours | 110.2 | 46.3 |
| Source | SHA | SHB | ||||||
| Target | SHB | QNRF | SHA | QNRF | ||||
| MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | |
| 3 | 12.8 | 24.3 | 120.9 | 218.1 | 97.5 | 171.7 | 160.3 | 298.8 |
| 4 | 11.1 | 15.7 | 108.0 | 197.4 | 119.3 | 202.9 | 172.7 | 306.4 |
| 5 | 12.6 | 23.7 | 118.3 | 215.6 | 117.4 | 200.7 | 177.6 | 322.0 |
| Source | SHA | SHB | QNRF | |||||||||
| Target | SHB | QNRF | SHA | QNRF | SHA | SHB | ||||||
| Method | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE |
| baseline | 14.8 | 27.7 | 134.5 | 230.5 | 132.6 | 229.7 | 190.6 | 305.9 | 88.2 | 145.0 | 18.8 | 35.6 |
| +SCR | 13.8 | 27.2 | 123.8 | 228.6 | 121.7 | 203.2 | 171.4 | 298.9 | 69.9 | 116.7 | 15.4 | 28.7 |
| +SBR (Ours) | 11.1 | 15.7 | 108.0 | 197.4 | 97.5 | 171.7 | 160.3 | 298.8 | 64.1 | 103.5 | 13.0 | 21.5 |
| w/o | 13.9 | 27.0 | 117.8 | 214.1 | 119.3 | 214.8 | 172.7 | 306.4 | 67.2 | 111.0 | 14.1 | 26.5 |
Crowd Counting
Crowd counting estimates how many people appear in images or video, supporting occupancy monitoring, safety planning, and crowd management.
See all 23 papers