leeyeehoo / CSRNet-pytorch

CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes
647 stars 261 forks source link

Model:Predictions. #6

Open Tikam02 opened 6 years ago

Tikam02 commented 6 years ago

How to predict estimated count from the trained model in Val.ipynb. Where is the output of the predicted estimated count? @leeyeehoo

leeyeehoo commented 6 years ago

Well I have to refine it later, it's just in the source code... Sorry for that

Tikam02 commented 6 years ago

screenshot from 2018-07-21 21-02-55

Well, I created density map for the different image from the model that I have saved. But couldn't able to find how to predict numbers.

leeyeehoo commented 6 years ago

You should use make_dataset.ipynb to generate the density map. And all the density map will be saved into .h5 file independently. You can just read the density map from the .h5 and use np.sum() func to calculate the numbers.

liuleiBUAA commented 6 years ago

@leeyeehoo when I train the model with train.py the loss is nan

Epoch: [0][1170/1200] Time 0.709 (0.417) Data 0.020 (0.017) Loss nan (nan)

here is the loss in terminal, I comment the seen=model.seen, otherwise it will give the error of no attribute of model.seen