S-DCNet
S-DCNet copied to clipboard
Count method is different from the original code in testing
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.
Hi! You are right. Thanks for pointing out the difference. I will try to fix the bug soon.
Fixed: https://github.com/dmburd/S-DCNet/commit/1d0b07ca1bd833cd59cb3c48b70461113db33406