Pongpisit-Thanasutives / Variations-of-SFANet-for-Crowd-Counting

The official implementation of "Encoder-Decoder Based Convolutional Neural Networks with Multi-Scale-Aware Modules for Crowd Counting"
https://ieeexplore.ieee.org/document/9413286
GNU General Public License v3.0
110 stars 32 forks source link

find dis #13

Closed KrystalCWT closed 3 years ago

KrystalCWT commented 3 years ago

Hi, I noticed in find_dis: dis = np.mean(np.partition(dis, 3, axis=1)[:, 1:4], axis=1, keepdims=True)

image with people less than 4 is illegal?

Pongpisit-Thanasutives commented 3 years ago

Yes, unfortunately, we have followed the proposed method in the MCNN paper (CVPR 2016) to calculate the average distance of each head to the 3 nearest heads. However, you can modify the code to follow your heuristics instead.

KrystalCWT commented 3 years ago

Yes, unfortunately, we have followed the proposed method in the MCNN paper (CVPR 2016) to calculate the average distance of each head to the 3 nearest heads. However, you can modify the code to follow your heuristics instead.

If I assign a fix value for image less than 3 ppl to do gaussian filter, does it affect the final performance?

KrystalCWT commented 3 years ago

Yes, unfortunately, we have followed the proposed method in the MCNN paper (CVPR 2016) to calculate the average distance of each head to the 3 nearest heads. However, you can modify the code to follow your heuristics instead.

If I assign a fix value for image less than 3 ppl to do gaussian filter, does it affect the final performance?

Besides, If I want a good performance on different dataset, what should I do to improve the generalization? Do you have any advices? Thanks.

Pongpisit-Thanasutives commented 3 years ago

My advice would be to conduct an ablation study on ASSP and CAN. Since both modules also increase the network complexity, possibly leading to overfitting. You could find the combination which fits your dataset (train + test) nature.