S-DCNet icon indicating copy to clipboard operation
S-DCNet copied to clipboard

Count method is different from the original code in testing

Open JimWang97 opened this issue 4 years ago • 2 comments

Hi, thanks for sharing the code, but I find that there are some differences.

In your code, you sum the GT density map as the GT count. But in the original testing code provided by the xhp, the GT count is obtained from GT_mat.

#xhp
gt_count = mat['all_num']

# your code
gt_count = sample['dmap'].numpy().sum()

These two values are different. For example, the count num of IMG_1.png in SHB testing set is 23, but the sum of density map is 22.32398.

This will lead to the deviation of MAE and MSE.

JimWang97 avatar Apr 25 '21 16:04 JimWang97

Hi! You are right. Thanks for pointing out the difference. I will try to fix the bug soon.

dmburd avatar Apr 28 '21 11:04 dmburd

Fixed: https://github.com/dmburd/S-DCNet/commit/1d0b07ca1bd833cd59cb3c48b70461113db33406

dmburd avatar May 17 '21 20:05 dmburd