Exclusivity-Guided Mask Learning for Semi-Supervised Crowd Instance Segmentation and Counting
Organizations: Harbin Institute of Technology, Shenzhen, China · City University of Hong Kong, Kowloon Tong, Hong Kong
Abstract
Semi-supervised crowd analysis is a prominent area of research, as unlabeled data are typically abundant and inexpensive to obtain. However, traditional point-based annotations constrain performance because individual regions are inherently ambiguous, and consequently, learning fine-grained structural semantics from sparse anno tations remains an unresolved challenge. In this paper, we first propose an Exclusion-Constrained Dual-Prompt SAM (EDP-SAM), based on our Nearest Neighbor Exclusion Circle (NNEC) constraint, to generate mask supervision for current datasets. With the aim of segmenting individuals in dense scenes, we then propose Exclusivity-Guided Mask Learning (XMask), which enforces spatial separation through a discriminative mask objective. Gaussian smoothing and a differentiable center sampling strategy are utilized to improve feature continuity and training stability. Building on XMask, we present a semi-supervised crowd counting framework that uses instance mask priors as pseudo-labels, which contain richer shape information than traditional point cues. Extensive experiments on the ShanghaiTech A, UCF-QNRF, and JHU++ datasets (using 5%, 10%, and 40% labeled data) verify that our end-to-end model achieves state-of-the-art semi-supervised segmentation and counting performance, effectively bridging the gap between counting and instance segmentation within a unified framework.
Figures & tables
| Methods | NNEC | ShTech A [ 65 ] | UCF-QNRF [ 18 ] | JHU++ [ 47 ] | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 5% | 10% | 40% | 5% | 10% | 40% | 5% | 10% | 40% | ||
| FastSAM [ 66 ] | 0.279 | 0.281 | 0.291 | 0.203 | 0.211 | 0.213 | 0.186 | 0.185 | 0.189 | |
| FastSAM [ 66 ] | ✓ | 0.287 | 0.290 | 0.300 | 0.223 | 0.229 | 0.233 | 0.197 | 0.182 | 0.201 |
| S4M [ 61 ] | 0.005 | 0.007 | 0.011 | 0.010 | 0.012 | 0.015 | 0.013 | 0.014 | 0.021 | |
| CrowdSAM [ 7 ] | ✓ | 0.201 | 0.201 | 0.212 | 0.149 | 0.156 | 0.163 | 0.187 | 0.189 | 0.192 |
| point only | ✓ | 0.195 | 0.194 | 0.202 | 0.198 | 0.201 | 0.207 | 0.180 | 0.182 | 0.183 |
| labeled Pct. | Methods | ShTech A [ 65 ] | UCF-QNRF [ 18 ] | JHU++ [ 47 ] | |||
|---|---|---|---|---|---|---|---|
| MAE↓ | MSE↓ | MAE↓ | MSE↓ | MAE↓ | MSE↓ | ||
| 5% | MT [ 50 ] | 104.7 | 33.2 | 172.4 | 284.9 | 101.5 | 363.5 |
| L2R [ 34 ] | 103.0 | 27.6 | 160.1 | 272.3 | 101.4 | 338.8 | |
| DAC [ 27 ] | 85.4 | 134.5 | 120.2 | 209.3 | 82.2 | 294.9 | |
| OT-M [ 29 ] | 83.7 | 133.3 | 118.4 | 195.4 | 82.7 | 304.5 | |
| P2R [ 30 ] | 69.9 | 119.5 | 100.1 | 182.5 | 77.8 | 293.5 | |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Labeled-Pct. | Average L2 Feature Distance | |
|---|---|---|
| within same instance | between different instances | |
| 40% | 0.630 | 0.560 |
| 10% | 0.600 | 0.570 |
| 5% | 0.610 | 0.550 |
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