CSRNet-pytorch icon indicating copy to clipboard operation
CSRNet-pytorch copied to clipboard

Model:Predictions.

Open Tikam02 opened this issue 7 years ago • 4 comments

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

Tikam02 avatar Jul 21 '18 12:07 Tikam02

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

leeyeehoo avatar Jul 21 '18 13:07 leeyeehoo

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.

Tikam02 avatar Jul 21 '18 15:07 Tikam02

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.

leeyeehoo avatar Jul 22 '18 14:07 leeyeehoo

@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

liuleiBUAA avatar Sep 29 '18 09:09 liuleiBUAA