Table of Contents
Fetching ...

Learning Discriminative Features for Crowd Counting

Yuehai Chen, Qingzhong Wang, Jing Yang, Badong Chen, Haoyi Xiong, Shaoyi Du

TL;DR

The paper tackles inaccuracies in crowd counting under high density caused by weak localization and foreground-background confusion. It introduces LDFNet, combining a Masked Feature Prediction Module (MPM) for context-aware feature reconstruction and a Supervised Pixel-level Contrastive Learning Module (CLM) to separate foreground heads from the background in feature space; both modules are lightweight and plug-and-play, with CLM disabled at inference. Empirical results across multiple datasets show consistent improvements when LDFNet is integrated with diverse baselines, particularly in dense scenes, and ablations confirm that both modules contribute to localization and discriminability with minimal overhead. The work demonstrates practical impact by enhancing localization and counting accuracy while remaining compatible with detection models, suggesting broad applicability in cluttered visual environments.

Abstract

Crowd counting models in highly congested areas confront two main challenges: weak localization ability and difficulty in differentiating between foreground and background, leading to inaccurate estimations. The reason is that objects in highly congested areas are normally small and high level features extracted by convolutional neural networks are less discriminative to represent small objects. To address these problems, we propose a learning discriminative features framework for crowd counting, which is composed of a masked feature prediction module (MPM) and a supervised pixel-level contrastive learning module (CLM). The MPM randomly masks feature vectors in the feature map and then reconstructs them, allowing the model to learn about what is present in the masked regions and improving the model's ability to localize objects in high density regions. The CLM pulls targets close to each other and pushes them far away from background in the feature space, enabling the model to discriminate foreground objects from background. Additionally, the proposed modules can be beneficial in various computer vision tasks, such as crowd counting and object detection, where dense scenes or cluttered environments pose challenges to accurate localization. The proposed two modules are plug-and-play, incorporating the proposed modules into existing models can potentially boost their performance in these scenarios.

Learning Discriminative Features for Crowd Counting

TL;DR

The paper tackles inaccuracies in crowd counting under high density caused by weak localization and foreground-background confusion. It introduces LDFNet, combining a Masked Feature Prediction Module (MPM) for context-aware feature reconstruction and a Supervised Pixel-level Contrastive Learning Module (CLM) to separate foreground heads from the background in feature space; both modules are lightweight and plug-and-play, with CLM disabled at inference. Empirical results across multiple datasets show consistent improvements when LDFNet is integrated with diverse baselines, particularly in dense scenes, and ablations confirm that both modules contribute to localization and discriminability with minimal overhead. The work demonstrates practical impact by enhancing localization and counting accuracy while remaining compatible with detection models, suggesting broad applicability in cluttered visual environments.

Abstract

Crowd counting models in highly congested areas confront two main challenges: weak localization ability and difficulty in differentiating between foreground and background, leading to inaccurate estimations. The reason is that objects in highly congested areas are normally small and high level features extracted by convolutional neural networks are less discriminative to represent small objects. To address these problems, we propose a learning discriminative features framework for crowd counting, which is composed of a masked feature prediction module (MPM) and a supervised pixel-level contrastive learning module (CLM). The MPM randomly masks feature vectors in the feature map and then reconstructs them, allowing the model to learn about what is present in the masked regions and improving the model's ability to localize objects in high density regions. The CLM pulls targets close to each other and pushes them far away from background in the feature space, enabling the model to discriminate foreground objects from background. Additionally, the proposed modules can be beneficial in various computer vision tasks, such as crowd counting and object detection, where dense scenes or cluttered environments pose challenges to accurate localization. The proposed two modules are plug-and-play, incorporating the proposed modules into existing models can potentially boost their performance in these scenarios.
Paper Structure (20 sections, 7 equations, 8 figures, 17 tables)

This paper contains 20 sections, 7 equations, 8 figures, 17 tables.

Figures (8)

  • Figure 1: Problems of existing regression-based crowd counting models. From left to right: input images from ShanghaiTech Part A dataset MCNN, Ground Truth density maps, the predicted density maps from DM-Count DM-Count, and the predicted density maps from our LDFNet+DM-Count.
  • Figure 2: The proposed supervised pixel-level contrastive learning module pulls pull the targets closer to each other and push them further away from the background.
  • Figure 3: The proposed learning discriminative feature network (LDFNet) framework. The LDFNet mainly contains a backbone, a masked feature prediction module (MPM), and a supervised pixel-level contrastive learning module (CLM). All the components including the backbone, MPM, CLM, and regression decoder are trainable in the training phase. While in the inference phase, the CLM would be removed and other components are used for inference. The masking process is pixel-wise on feature map whose size is 1/32 of the input image. For intuitive visualization, we upsample the feature map to the size of the original image. As a result, this figure presents that the masking process seems patch-wise (32$\times$32).
  • Figure 4: The performances obtained by using different masking ratios.
  • Figure 5: Different masking strategies. The masking process is pixel-wise on feature map whose size is 1/32 of the input image. For intuitive visualization, we upsample the feature map to the size of the original image. As a result, this figure presents that the masking process seems patch-wise (32$\times$32).
  • ...and 3 more figures