← All projects

CVPR 2024

CrowdDiff

Generate several possible crowd maps and combine their head detections to reduce counting errors in dense or ambiguous scenes.

Co-author

Density hypotheses

Green detections enter the fused map. Red detections are rejected. GT is the ground-truth count, and Final is the fused count.

How it works

  1. Train an image-conditioned denoising model on noisy density maps made with narrow kernels. A regression branch supports feature learning during training.

  2. Sample multiple density-map hypotheses and convert them into crowd maps containing estimated head locations.

  3. Order the maps by structural similarity and fuse their detections, rejecting duplicate locations using a neighborhood-based radius. Count the resulting head locations.

The model

Image-conditioned density generation with a counting branch used during training.

Multi-hypothesis density estimation

CrowdDiff models a crowd density map as a conditional diffusion output. Repeated sampling produces multiple plausible maps, whose head-location estimates can be fused to improve counting.

The method uses narrow density kernels to retain localized head structure. Its fusion procedure adds new head detections and rejects repeated locations across hypotheses.

Results

Sampling more density maps reduces counting error and increases runtime. MAE is the average absolute error in the estimated number of people.

Counting accuracy and runtime

Choose the number of sampled hypotheses from the published ablation.

68.95Average counting error (people)

770 msReported inference time

Hypotheses MAE MSE Runtime
1 74.59 134.78 210 ms
2 71.94 130.49 430 ms
4 68.95 125.65 770 ms
8 66.97 122.44 1,360 ms

CVPR 2024, Table 6. UCF-QNRF ablation.

Lower error is better. More hypotheses increase inference time; the paper selects four.

Runtime increases from 210 to 1,360 ms. The paper selects four hypotheses as its quality/runtime tradeoff.

Presentation

CrowdDiff predicts detailed density maps and uses multiple hypotheses for crowd counting