All models

SASNet

Crowd-counting CNN that blends density maps from five feature levels using learned per-patch confidence scores.

Detection and tracking · 237 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (70 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
38.9M
Operations
237
Framework
PyTorch
Recurrent
No
Published
AAAI 2021
Cited by
182 (as of 24 October 2026)
Authors
Qingyu Song, Changan Wang, Yabiao Wang and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m19961
Graph hash
c01ce6d48dfd3e6a2f74b9df63cae6d5a15fa1c7e68e6500d57e5a91f6b97267
Skeleton hash
ccab6771bcf9927a317c331e98de950c183b03569b713f2331d851f454aa3db1
Architecture hash
b5acbe957a1023bf26cbd9069ab7ceb8f2c639a4e1d17e1f7aa0dab6006c9361
Diagram SHA-256
446e1d753e4d174347d9bc3392e3ae47a84be6ff89e272388d1f7475f89cb2e3
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

SASNet, the Scale-Adaptive Selection Network, is a crowd-counting model: it estimates the number of people in an image by predicting a density map. The paper targets the large variation in head size within crowd scenes, which is harder to handle because datasets carry no scale annotations. Its encoder is the first 13 convolutional layers of VGG-16 bn, and a U-shaped decoder turns them into five feature levels, P1 to P5, at different resolutions.

Each level feeds a density head and a confidence head, and the confidence head scores how likely that level is to be the most appropriate one for a given image patch. Rather than keeping only the best level, SASNet takes a weighted average of all five density maps, which the paper says helps bridge discrete feature levels and continuous scale variation. Training adds a Pyramid Region Awareness Loss (PRA Loss), which recursively selects the hardest sub-regions within a patch down to the pixel level so they can be optimized further.

The paper evaluates on ShanghaiTech, UCF CC 50, UCF-QNRF and WorldExpo'10. In its ablation on ShanghaiTech Part A, the full model reaches an MAE of 53.59 and an MSE of 88.38. A patch size of 32 performed best, and the paper uses it as the default in all experiments.

Key idea. SASNet learns per-patch confidence scores that weight density maps from five feature levels, and adds the PRA Loss to refine the hardest sub-regions down to individual pixels.

  • sasnet
  • scale-adaptive selection network
  • crowd counting
  • people counting
  • density map
  • pra loss
  • pyramid region awareness loss
  • multi-scale features
  • shanghaitech

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Song_2021, title={To Choose or to Fuse? Scale Selection for Crowd Counting}, volume={35}, ISSN={2159-5399}, url={http://dx.doi.org/10.1609/aaai.v35i3.16360}, DOI={10.1609/aaai.v35i3.16360}, number={3}, journal={Proceedings of the AAAI Conference on Artificial Intelligence}, publisher={Association for the Advancement of Artificial Intelligence (AAAI)}, author={Song, Qingyu and Wang, Changan and Wang, Yabiao and Tai, Ying and Wang, Chengjie and Li, Jilin and Wu, Jian and Ma, Jiayi}, year={2021}, month=May, pages={2576–2583} }