Abstract
Crowd counting models often struggle with domain bias, where a model trained on one dataset fails to generalize to others due to variations in density, lighting, and perspective. We introduce the Modulating Domain-specific Knowledge Network (MDKNet), a simple yet effective one-stage framework for multidomain crowd counting. MDKNet utilizes Instance-specific Batch Normalization (IsBN) to dynamically adjust network features and a Domain-guided Virtual Classifier (DVC) to map images into a domain-aware latent space. By employing "virtual classes" to represent overlapping distributions between datasets, MDKNet achieves superior performance across major benchmarks, including a significant improvement on the NWPU-Crowd dataset.
Introduction
Estimating crowd sizes in diverse urban environments is critical for public safety. However, deep learning models typically suffer from domain bias, prioritizing the statistical distributions of dominant datasets at the expense of others. Traditional solutions involving multi-stage training or complex multi-branch architectures are often inefficient and scale poorly as new datasets are added. MDKNet addresses this by modulating a single backbone network to be adaptive to any encountered domain, treating the problem as a matter of dynamic adjustment rather than rigid specialization.
Methodology: MDKNet Architecture
The core of MDKNet lies in two primary components designed to neutralize domain bias through feature modulation:
- Instance-specific Batch Normalization (IsBN): Unlike standard Batch Normalization with static parameters, IsBN acts as a base modulator. It predicts unique scaling and shift parameters for every input image, allowing the network to refine its internal information flow based on the specific distribution of that image.
- Domain-guided Virtual Classifier (DVC): To provide accurate guidance for IsBN, DVC learns a domain-separable latent space. Instead of relying solely on noisy dataset labels, it uses "virtual classes" to capture the overlaps and nuances between different data sources. This allows the model to recognize when an image from one dataset visually resembles another, facilitating better adaptation.
Unlike previous state-of-the-art methods that required three or more training stages, MDKNet uses a streamlined one-stage training pipeline, making it significantly easier to implement and scale.
Experiments and Results
MDKNet was evaluated on four major benchmarks: ShanghaiTech (Part A and B), UCF-QNRF, and NWPU-Crowd. These datasets were merged into a single multidomain training set to test the model's robustness against mixed distributions.
MDKNet consistently outperformed existing multidomain methods. On the massive NWPU-Crowd dataset, it achieved a Mean Absolute Error (MAE) of 51.5, a significant improvement over the baseline's 60.8 and the previous best multidomain model (DKPNet) at 61.8. Qualitative results demonstrate that the virtual classification labels allow the model to produce more accurate density maps by correctly identifying the underlying domain characteristics of the input, even when they cross dataset boundaries.
Conclusion
MDKNet provides a streamlined, one-stage solution for multidomain crowd counting. By shifting from fixed specialization to dynamic modulation via IsBN and virtual classes, the model effectively overcomes domain bias without increasing parameter complexity. This approach ensures that the model remains efficient regardless of the number of training domains. Future research could explore applying this virtual classification logic to other computer vision tasks suffering from domain shift, such as object detection or semantic segmentation in autonomous driving.
Summary updated