Skip to main content
QUICK REVIEW

[Paper Review] Scene-Adaptive Attention Network for Crowd Counting

Xing Wei, Yuanrui Kang|arXiv (Cornell University)|Dec 31, 2021
Video Surveillance and Tracking MethodsComputer Science8 citations
TL;DR

This paper proposes SAANet, a scene-adaptive attention network for crowd counting that uses a deformable attention mechanism within a Transformer backbone to dynamically adapt sampling locations and attention weights to varying crowd scales and scene layouts. The method achieves state-of-the-art performance, ranking first on the NWPU-Crowd benchmark with improved accuracy and efficiency over existing CNN and Transformer-based models.

ABSTRACT

In recent years, significant progress has been made on the research of crowd counting. However, as the challenging scale variations and complex scenes existed in crowds, neither traditional convolution networks nor recent Transformer architectures with fixed-size attention could handle the task well. To address this problem, this paper proposes a scene-adaptive attention network, termed SAANet. First of all, we design a deformable attention in-built Transformer backbone, which learns adaptive feature representations with deformable sampling locations and dynamic attention weights. Then we propose the multi-level feature fusion and count-attentive feature enhancement modules further, to strengthen feature representation under the global image context. The learned representations could attend to the foreground and are adaptive to different scales of crowds. We conduct extensive experiments on four challenging crowd counting benchmarks, demonstrating that our method achieves state-of-the-art performance. Especially, our method currently ranks No.1 on the public leaderboard of the NWPU-Crowd benchmark. We hope our method could be a strong baseline to support future research in crowd counting. The source code will be released to the community.

Motivation & Objective

  • To address the limitations of fixed-receptive-field CNNs and windowed-attention Transformers in handling scale variations and complex scenes in crowd counting.
  • To develop a flexible attention mechanism that adapts to scene layout and object scale variations without relying on ground-truth bounding boxes.
  • To enhance feature representation and density estimation through multi-level feature fusion and count-attentive feature enhancement modules.
  • To achieve state-of-the-art performance with reduced computational cost and model parameters.

Proposed method

  • Introduces Deformer, a novel Transformer backbone that combines deformable attention with global attention to learn adaptive feature representations through learnable sampling offsets and dynamic attention weights.
  • Employs deformable attention to allow spatially adaptive aggregation of features, enabling better modeling of perspective distortions and scale variations in crowds.
  • Proposes a multi-level feature fusion (MFF) module that uses deformable attention to efficiently fuse features across different stages, improving localization and counting accuracy.
  • Introduces the count-attentive feature enhancement (CAFE) module, a stack of transformer decoder layers with count loss supervision that recalibrates features using learned attention maps.
  • Uses a hybrid attention strategy in Deformer, alternating between local deformable attention and global attention to balance efficiency and representational capacity.
  • Employs a standard density regression head with L1/L2 loss for final counting, trained end-to-end with the proposed components.

Experimental results

Research questions

  • RQ1Can a deformable attention mechanism in a Transformer backbone improve feature representation for crowd counting under large scale variations and complex scenes?
  • RQ2How does the proposed Deformer backbone compare to fixed-size windowed attention and standard self-attention in terms of adaptability and performance?
  • RQ3To what extent do multi-level feature fusion and count-attentive feature enhancement improve counting accuracy and localization?
  • RQ4Can the proposed method generalize across diverse crowd counting benchmarks with minimal architectural assumptions?
  • RQ5Does the model achieve state-of-the-art performance with lower computational cost and parameter count compared to existing SOTA methods?

Key findings

  • SAANet achieves the best performance on the NWPU-Crowd benchmark, ranking No.1 on its public leaderboard with a MAE of 51.7 and MSE of 80.1.
  • The Deformer backbone outperforms larger models like Twins-large and Twins-base, demonstrating superior parameter efficiency and accuracy.
  • The multi-level feature fusion (MFF) module reduces MAE by 0.6 and MSE by 2.1 compared to the single-level baseline.
  • The count-attentive feature enhancement (CAFE) module further reduces MAE by 1.0 and MSE by 3.1 compared to the baseline.
  • The combination of MFF and CAFE achieves the best performance, reducing MAE by 2.1 and MSE by 6.2 compared to the baseline.
  • Visualization confirms that deformable attention sampling points and offsets correlate positively with object scale, even without ground-truth bounding box supervision.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.