Closed cryax closed 6 years ago
you have to feed the estimation map through the neural network to get the count number.
2017-11-10 16:45 GMT+08:00, cryax notifications@github.com:
Hi svishwa, Is there any script take an input image and return estimation map or count number?
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/svishwa/crowdcount-mcnn/issues/9
guohaoyu110 is right. you can take a look at test.py which does exactly the same thing that you are asking for.
density_map = net(im_data, gt_data) I'm wondering why we need gt_data in estimating density_map?
gt_data is not required in density_map = net(im_data, gt_data) during inference. You can send gt_data = None and it will work just fine. gt_data is used only in training mode to calculate the loss.
Hi, thanks for your reply, but results are quite inaccurate (I used the final model train for shanghaitechA)
As you can see from the code below, gt_data is used only in training mode:
When you say inaccurate - what are the errors you are getting?
How different are they compared to this:
hi svishwa, I tested on some wild images I downloaded from internet.
I see. I have observed this too. In fact, when the model trained on ShanghaiTechA is tested on test set of ShanghaiTechB - you will notice a performance gap. This is due to change in distribution of the training and test set. If you want to improve on your own dataset - you will have to fine-tune it first.
hi thanks for your confirm, I'm wondering is this problem due to shortage of training set?
Quite possible. The number of training images in ShanghaiTech A are less than 300 which is way too low if you expect it to generalize very well to images from the wild.
Hi svishwa, Is there any script take an input image and return estimation map or count number?
Is this model accurate on sparse image?