← 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

Counting from several density maps

An image-conditioned diffusion model samples several plausible head-density maps. Combining their detections reduces ambiguity in the count.

Crowd image and density-map comparisons showing estimated counts for the same scene.
Original slide

Denoising a crowd-density map

An image-conditioned denoiser estimates head locations. An auxiliary counting branch helps train the shared features.

CrowdDiff pipeline with the input image, counting branch, denoiser and output density map.
Original slide

Merging head locations

A rejection radius based on local head spacing filters duplicate detections while retaining newly identified heads.

Schematic of the neighborhood and rejection radii, with accepted points in green and rejected points in red.
Original slide

Combining different samples

Each realization can reveal an additional head. Merging their estimates produces a fused map of head locations.

Crowd examples with successive refinements and the final fused map.
Original slide

Counting accuracy and runtime

On UCF-QNRF, eight samples reduce mean absolute error to 66.97, but raise runtime to 1,360 ms. The paper uses four samples.

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.

Original slide