# A Hybrid Multi-Scale Transformer-CNN UNet for Crowd Counting

**Authors:** Kai Zhao, Chunhao He, Shufan Peng, Tianliang Lu

PMC · DOI: 10.3390/s26010333 · Sensors (Basel, Switzerland) · 2026-01-04

## TL;DR

This paper introduces a new deep learning model for counting crowds in images, achieving better accuracy than previous methods.

## Contribution

A hybrid model combining a transformer and CNN with a U-shaped architecture for improved crowd counting.

## Key findings

- HMSTUNet achieves the best MAE on five public crowd counting datasets.
- The model sets new state-of-the-art records with specific MAE/MSE values on multiple benchmarks.

## Abstract

Crowd counting is a critical computer vision task with significant applications in public security and smart city systems. While deep learning has markedly improved accuracy, persistent challenges include extreme scale variations, severe occlusion, and complex background clutter. To address these issues, we propose a novel Hybrid Multi-Scale Transformer-CNN U-shaped Network (HMSTUNet). Our key contributions are: a hybrid architecture integrating a Multi-Scale Vision Transformer (MSViT) for capturing long-range dependencies and a Dynamic Convolutional Attention Block (DCAB) for modeling local density patterns; and a U-shaped encoder–decoder with skip connections for effective multi-level feature fusion. Extensive evaluations on five public benchmarks show that HMSTUNet achieves the best Mean Absolute Error (MAE) on all five datasets and the best Mean Squared Error (MSE) on three. It sets new state-of-the-art records, attaining MAE/MSE of 49.1/77.8 on SHA, 6.2/10.3 on SHB, 142.1/192.7 on UCF_CC_50, 77.9/132.5 on UCF-QNRF, and 43.2/119.6 on NWPU-Crowd. These results demonstrate the model’s strong robustness and generalization capability.

## Full-text entities

- **Diseases:** injury to (MESH:D014947)
- **Chemicals:** MSViT (-)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12788309/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12788309/full.md

## References

41 references — full list in the complete paper: https://tomesphere.com/paper/PMC12788309/full.md

---
Source: https://tomesphere.com/paper/PMC12788309