# CCTrans: Simplifying and Improving Crowd Counting with Transformer

arXiv: https://arxiv.org/abs/2109.14483 · HTML: https://mlsanity.com/paper/2109.14483/

## Key facts

- Cited by 30 papers in the map (data through 14 Oct 2026).
- Builds on 34 of its 49 references that are in the map.
- First posted on arXiv 29 Sep 2021.

## Builds on (most cited first, 30 of 34)

- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://mlsanity.com/paper/2103.14030/) (2021)
- [End-to-End Object Detection with Transformers](https://mlsanity.com/paper/2005.12872/) (2020)
- [Training data-efficient image transformers & distillation through attention](https://mlsanity.com/paper/2012.12877/) (2020)
- [DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs](https://mlsanity.com/paper/1606.00915/) (2016)
- [Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions](https://mlsanity.com/paper/2102.12122/) (2021)
- [Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning](https://mlsanity.com/paper/1602.07261/) (2016)
- [Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers](https://mlsanity.com/paper/2012.15840/) (2020)
- [Twins: Revisiting the Design of Spatial Attention in Vision Transformers](https://mlsanity.com/paper/2104.13840/) (2021)
- [Conditional Positional Encodings for Vision Transformers](https://mlsanity.com/paper/2102.10882/) (2021)
- [CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes](https://mlsanity.com/paper/1802.10062/) (2018)
- [Composition Loss for Counting, Density Map Estimation and Localization in Dense Crowds](https://mlsanity.com/paper/1808.01050/) (2018)
- [Bayesian Loss for Crowd Count Estimation with Point Supervision](https://mlsanity.com/paper/1908.03684/) (2019)
- [Rethinking Counting and Localization in Crowds:A Purely Point-Based Framework](https://mlsanity.com/paper/2107.12746/) (2021)
- [NWPU-Crowd: A Large-Scale Benchmark for Crowd Counting and Localization](https://mlsanity.com/paper/2001.03360/) (2020)
- [Context-Aware Crowd Counting](https://mlsanity.com/paper/1811.10452/) (2018)
- [Learning from Synthetic Data for Crowd Counting in the Wild](https://mlsanity.com/paper/1903.03303/) (2019)
- [Distribution Matching for Crowd Counting](https://mlsanity.com/paper/2009.13077/) (2020)
- [Receptive Field Block Net for Accurate and Fast Object Detection](https://mlsanity.com/paper/1711.07767/) (2017)
- [Switching Convolutional Neural Network for Crowd Counting](https://mlsanity.com/paper/1708.00199/) (2017)
- [Point in, Box out: Beyond Counting Persons in Crowds](https://mlsanity.com/paper/1904.01333/) (2019)
- [TransCrowd: weakly-supervised crowd counting with transformers](https://mlsanity.com/paper/2104.09116/) (2021)
- [Generating High-Quality Crowd Density Maps using Contextual Pyramid CNNs](https://mlsanity.com/paper/1708.00953/) (2017)
- [Perspective-Guided Convolution Networks for Crowd Counting](https://mlsanity.com/paper/1909.06966/) (2019)
- [Exploiting Unlabeled Data in CNNs by Self-supervised Learning to Rank](https://mlsanity.com/paper/1902.06285/) (2019)
- [Revisiting Perspective Information for Efficient Crowd Counting](https://mlsanity.com/paper/1807.01989/) (2018)
- [From Open Set to Closed Set: Counting Objects by Spatial Divide-and-Conquer](https://mlsanity.com/paper/1908.06473/) (2019)
- [Crowd Counting with Deep Structured Scale Integration Network](https://mlsanity.com/paper/1908.08692/) (2019)
- [ADCrowdNet: An Attention-injective Deformable Convolutional Network for Crowd Understanding](https://mlsanity.com/paper/1811.11968/) (2018)
- [Spatial Uncertainty-Aware Semi-Supervised Crowd Counting](https://mlsanity.com/paper/2107.13271/) (2021)

## Built on by (most cited first, 30 of 30)

- [An End-to-End Transformer Model for Crowd Localization](https://mlsanity.com/paper/2202.13065/) (2022)
- [Point-Query Quadtree for Crowd Counting, Localization, and More](https://mlsanity.com/paper/2308.13814/) (2023)
- [Recent Advances in Vision Transformer: A Survey and Outlook of Recent Work](https://mlsanity.com/paper/2203.01536/) (2022)
- [CrowdDiff: Multi-hypothesis Crowd Density Estimation using Diffusion Models](https://mlsanity.com/paper/2303.12790/) (2023)
- [Revisiting Crowd Counting: State-of-the-art, Trends, and Future Perspectives](https://mlsanity.com/paper/2209.07271/) (2022)
- [Counting Crowds in Bad Weather](https://mlsanity.com/paper/2306.01209/) (2023)
- [Boosting Detection in Crowd Analysis via Underutilized Output Features](https://mlsanity.com/paper/2308.16187/) (2023)
- [Scene-Adaptive Attention Network for Crowd Counting](https://mlsanity.com/paper/2112.15509/) (2021)
- [CountFormer: Multi-View Crowd Counting Transformer](https://mlsanity.com/paper/2407.02047/) (2024)
- [CrowdFormer: Weakly-supervised Crowd counting with Improved Generalizability](https://mlsanity.com/paper/2203.03768/) (2022)
- [Focus for Free in Density-Based Counting](https://mlsanity.com/paper/2306.05129/) (2023)
- [RGB-T Multi-Modal Crowd Counting Based on Transformer](https://mlsanity.com/paper/2301.03033/) (2023)
- [Vehicle Perception from Satellite](https://mlsanity.com/paper/2402.00703/) (2024)
- [Joint CNN and Transformer Network via weakly supervised Learning for efficient crowd counting](https://mlsanity.com/paper/2203.06388/) (2022)
- [SoybeanNet: Transformer-Based Convolutional Neural Network for Soybean Pod Counting from Unmanned Aerial Vehicle (UAV) Images](https://mlsanity.com/paper/2310.10861/) (2023)
- [SQLNet: Scale-Modulated Query and Localization Network for Few-Shot Class-Agnostic Counting](https://mlsanity.com/paper/2311.10011/) (2023)
- [SoftHGNN: Soft Hypergraph Neural Networks for General Visual Recognition](https://mlsanity.com/paper/2505.15325/) (2025)
- [The Effectiveness of a Simplified Model Structure for Crowd Counting](https://mlsanity.com/paper/2404.07847/) (2024)
- [DenseTrack: Drone-based Crowd Tracking via Density-aware Motion-appearance Synergy](https://mlsanity.com/paper/2407.17272/) (2024)
- [Visual Crowd Analysis: Open Research Problems](https://mlsanity.com/paper/2308.10677/) (2023)
- [Why Existing Multimodal Crowd Counting Datasets Can Lead to Unfulfilled Expectations in Real-World Applications](https://mlsanity.com/paper/2304.06401/) (2023)
- [Efficient Masked AutoEncoder for Video Object Counting and A Large-Scale Benchmark](https://mlsanity.com/paper/2411.13056/) (2024)
- [ProgRoCC: A Progressive Approach to Rough Crowd Counting](https://mlsanity.com/paper/2504.13405/) (2025)
- [MAFNet: A Multi-Attention Fusion Network for RGB-T Crowd Counting](https://mlsanity.com/paper/2208.06761/) (2022)
- [A Unified Object Counting Network with Object Occupation Prior](https://mlsanity.com/paper/2212.14193/) (2022)
- [Vision Transformers for Weakly-Supervised Microorganism Enumeration](https://mlsanity.com/paper/2412.02250/) (2024)
- [Constrained Gaussian Process Motion Planning via Stein Variational Newton Inference](https://mlsanity.com/paper/2504.04936/) (2025)
- [TP-MVCC: Tri-plane Multi-view Fusion Model for Silkie Chicken Counting](https://mlsanity.com/paper/2509.24329/) (2025)
- [Getting the Numbers Rightunicodex2014Modelling Multi-Class Object Counting in Dense and Varied Scenes](https://mlsanity.com/paper/2510.02213/) (2025)
- [Count Anything](https://mlsanity.com/paper/2605.30846/) (2026)

## Abstract (arXiv)

Most recent methods used for crowd counting are based on the convolutional neural network (CNN), which has a strong ability to extract local features. But CNN inherently fails in modeling the global context due to the limited receptive fields. However, the transformer can model the global context easily. In this paper, we propose a simple approach called CCTrans to simplify the design pipeline. Specifically, we utilize a pyramid vision transformer backbone to capture the global crowd information, a pyramid feature aggregation (PFA) model to combine low-level and high-level features, an efficient regression head with multi-scale dilated convolution (MDC) to predict density maps. Besides, we tailor the loss functions for our pipeline. Without bells and whistles, extensive experiments demonstrate that our method achieves new state-of-the-art results on several benchmarks both in weakly and fully-supervised crowd counting. Moreover, we currently rank No.1 on the leaderboard of NWPU-Crowd. Our code will be made available.
