Variations-of-SFANet-for-Crowd-Counting icon indicating copy to clipboard operation
Variations-of-SFANet-for-Crowd-Counting copied to clipboard

How to make GT ground truth map suitable for UCF trained model?

Open li-bowen-official opened this issue 1 year ago • 3 comments

Hello!

I have a ground truth for images in the form of coordinate points. Is there a way to turn this into a ground truth density map that I can use to compare to the MSFA UCF predicted density map and also visualise? So that I can perhaps make a confusion matrix.

Also, for the bayesian processed SH datasets, the .npy files, I get that the first 2 columns are the width and height coordinates, but what does the 3rd column represent? Some sort of distance or radius? Is this something that can be used to create the ground truth map, or is this for something else?

Thank you for your constant updates and help!

li-bowen-official avatar May 23 '23 08:05 li-bowen-official

Thank you for the questions.

Hope this helps!

Pongpisit-Thanasutives avatar Jun 03 '23 05:06 Pongpisit-Thanasutives

Hello! I have a related question.

I saw that in density_map.py, the Gaussian kernel is given a sigma of 5. Do you know what would be the rationale for that? In the paper you shared they mentioned that a fixed value isn't as good.

fatbringer avatar Jun 14 '23 02:06 fatbringer

Thank you for the questions.

  • According to the convolution with geometry-adaptive kernels mentioned in the MCNN paper, a sigma value for each object could be set proportionally to the average distance to its k nearest neighbors. Then you have different values of sigma for different object coordinates.
  • You can relax the idea and get a single sigma for a whole image, which at least gives good train&validation performance/curve.
  • Roughly speaking, you may try setting sigma > 5 for sparse crowd patterns. And for more dense crowd patterns, you may try sigma < 5.

I Hope this clarifies your questions

Pongpisit-Thanasutives avatar Jun 15 '23 09:06 Pongpisit-Thanasutives