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

Unable to reproduce the result of the testing image #25

Open icoicqico opened 3 years ago

icoicqico commented 3 years ago

Unable to reproduce the result of the testing image, with using the pretrained model, anyone know how to reproduce the result? thanks.

Pongpisit-Thanasutives commented 3 years ago

Can I have more details on the pretrained weights that you are using and also the datasets, Thanks.

icoicqico commented 3 years ago

I have tried all pretrained weights on the readme page, testing on the image img_0071_heatpmap.png, but only the left side. And the result wasn't even close to 1236, was around 500.

Pongpisit-Thanasutives commented 3 years ago

@icoicqico The img_0071_heatpmap.png in ./images went through the replotting and exporting for visualization purposes. It is not supposed to be cropped and used as an input image.

If you want to test on an image in the UCF-QNRF dataset, please download the dataset here. Also, you should be using the pretrained M_SFANet* on UCF-QNRF, download here.

The actual img_0071.jpg is in the "Test dir" of the UCF-QNRF dataset. To preprocess (UCF-QNRF) before training&testing, please check the BL repo. In this repo, now, I only provide the Bayesian preprocessed SHA&SHB datasets.

The attached file is the actual img_0071.jpg. img_0071.zip

Hope this helps, sorry for the confusion. Thanks.

icoicqico commented 3 years ago

Thanks for your reply, I will try to download and test again.

icoicqico commented 3 years ago

Hello, I have tested the image again but the result wasn't close to the ground truth.

Pongpisit-Thanasutives commented 3 years ago

@icoicqico Since I do not see your code, I cannot really tell what went wrong for you. However, the model still works fine for me, even in the CPU environment. Hope this helps.

The test file -> Test on CPU.ipynb.zip

Screenshot 2021-11-23 at 20 24 28