ai china

How a crowd counter can miss ten people and still get the count right

4 sources 3 primary sources November 18, 2026

Loading reads and saves…
Text

Look up the pavement toward the blue Jiujiang Road sign. At the bottom of the photograph, a woman in black takes a step across a paving stone. Near the sign, a whole cluster of heads fits into roughly the same space as hers. This Shanghai street was one of the scenes researchers used in 2016 to ask a computer to count people from a single photograph. Suppose it misses ten pedestrians near the sign and counts ten in the foreground twice. Its answer earns a perfect score for that image. The errors disappear the moment someone adds up the street.[1]

Pedestrians cross a broad Shanghai pavement, with large gaps between people in the foreground and a dense group beneath a blue road sign in the distance.
A street photograph from Part B of the ShanghaiTech dataset, reproduced from Figure 1 of the 2016 paper. The researchers blurred faces for publication.[1]

What a dot on a head is worth

For the ShanghaiTech dataset, annotators marked one point on each visible head. Their work yielded two quite different collections. Part A comprised 482 images gathered online, with about 501 people per image on average. Part B comprised 716 Shanghai street photographs averaging about 124. Keeping the two sets separate matters. An error of twenty people has a different scale on a shopping street than in a photograph of a packed rally.[1]

Yingying Zhang and colleagues tried two ways to teach a network from those dots. In one experiment they gave it the total to aim for. In the other they spread each dot into a small patch whose values summed to one person. Overlapping patches could then describe a tightly packed group even where individual shoulders were impossible to distinguish. A prediction could be checked against this density map at many places across the frame. Misplacing a group across the street now carried a penalty during training.[1]

The payoff shows up in a particularly clean comparison in Table 2 of the paper. On the 316 held-out Shanghai street photographs, the version trained on totals alone missed by 70.9 people per image on average. With the same multi-column network trained on density maps, that mean absolute error fell to 26.4. Both numbers measure the size of the final counting mistake, in either direction. The locations helped the network learn even though the score discarded them.[1]

A second score for pointing

By 2018, the authors of CSRNet reported an average error of 10.6 on the same Part B test set. Their network used spaced-out filters to gather information from a wider area of the photograph while preserving detail in its density estimate. The smaller error strengthened the case for estimating street totals. It still left open a question anyone looking at the Jiujiang Road photograph could ask. How many of the people under that sign could the model actually point to?[2]

In 2020 the NWPU-Crowd team opened a separate localization evaluation. Its annotations included head positions and boxes. Researchers could submit predicted positions and see both the fraction of their marks that matched people (precision) and the fraction of labeled people they had found (recall). In the ten-missed, ten-counted-twice example, a second mark on the same pedestrian cannot make up for a missing mark down the street. An image containing no people, another case included in NWPU-Crowd, makes every predicted head a false alarm.[3]

The distance allowed for a match also changes what a result means. In 2023 the authors of Point-Query Quadtree tested a model that searched densely crowded regions with more closely spaced queries. On the NWPU-Crowd test set, the same predictions yielded an F1 score of 0.742 under the looser matching radius and 0.675 under the tighter one. F1 combines precision and recall. Tightening the radius left every photograph and every predicted count intact. It changed which marks earned credit for finding a particular person.[4]

Back on the pavement, someone estimating attendance may be satisfied with a small error across the whole frame. Someone deciding which end of the block needs another steward has a different question. For that reader, the most revealing line in the results is the one that says how close a prediction had to land to the head beneath the sign.[3][4]

Sources

  1. Yingying Zhang and colleagues, “Single-Image Crowd Counting via Multi-Column Convolutional Neural Network,” CVPR 2016, Figure 1 and Tables 1–2.
  2. Yuhong Li, Xiaofan Zhang and Deming Chen, “CSRNet,” CVPR 2018, architecture and ShanghaiTech evaluation.
  3. Qi Wang and colleagues, NWPU-Crowd project page, annotation releases and evaluation protocol, 2020.
  4. Chengxin Liu and colleagues, “Point-Query Quadtree for Crowd Counting, Localization, and More,” ICCV 2023, Table 2.
Previous Yaohua takes on the hours after a coral dive Next How old does a giant panda look?

Recommended In ai china

Matched by subject and format