Closed ghost closed 3 years ago
Thanks for your feedback. Do you modify the test.py? I guess your Pred result is by summing the predicted output instead of by finding the local maxima. Maybe you can solve the problem by adopting the latest version of test.py. The implementation of LMDS is in Line 154 of test.py. When I run python test.py --test_dataset ShanghaiA --pre model_best.pth, ........ begin test IMG_1.jpg Gt 172.00 Pred 231 IMG_10.jpg Gt 502.00 Pred 429 IMG_100.jpg Gt 391.00 Pred 430 IMG_101.jpg Gt 211.00 Pred 228 IMG_102.jpg Gt 223.00 Pred 255 IMG_103.jpg Gt 430.00 Pred 510 .......
Thank you for your answer. I updated a test.py file, but this problem still exists, and I found that the results of not loading “/model/ShanghaiA/model_best.pth” and successfully loading “/model/ShanghaiA/model_best.pth” are the same result, I don’t think it’s the problem of LMDS.
#####################
./model/ShanghaiA/model_best.pth
=> no checkpoint found at './model/ShanghaiA/model_best.pth'
100000.0 0
Pre_load dataset ......
begin test
IMG_1.jpg Gt 172.00 Pred 177319
IMG_10.jpg Gt 502.00 Pred 193268
IMG_100.jpg Gt 391.00 Pred 91857
##################### ./model/ShanghaiA/model_best_57.pth => loading checkpoint './model/ShanghaiA/model_best_57.pth' 57.0989010989011 921 Pre_load dataset ...... begin test IMG_1.jpg Gt 172.00 Pred 177319 IMG_10.jpg Gt 502.00 Pred 193268 IMG_100.jpg Gt 391.00 Pred 91857 IMG_101.jpg Gt 211.00 Pred 183484 IMG_102.jpg Gt 223.00 Pred 31301
In the Baidu-Disk you provided, the pre-training file of Part_A model is the model_best_57.pth
The command "./model/ShanghaiA/model_best_57.pth" is right. It seems that the pre-trained model did not load successfully. However, I do not get any wrong when I utilize the same command. You can add my WeChat (liangdingkang) to let me know about this problem in detail.
Thank you for your excellent work. I sent you a friend request. I am sorry to disturb you during the holidays.
Hi,thank you for your code, I tried to run test.py with the code you provided, but the results are quite different. The details are as follows:
python test.py --test_dataset ShanghaiA --pre ./model/ShanghaiA/model_best_57.pth {'train_dataset': 'ShanghaiA', 'task_id': 'save_file/A_baseline', 'workers': 16, 'print_freq': 200, 'start_epoch': 0, 'test_dataset': 'ShanghaiA', 'pre': './model/ShanghaiA/model_best_57.pth', 'batch_size': 16, 'seed': 1, 'best_pred': 100000.0, 'lr': '1e-4', 'prelo ad_data': True, 'visual': False} [2021-04-02 14:00:06] INFO (Networks.HR_Net.seg_hrnet/MainThread) => init weights from normal distribution ./model/ShanghaiA/model_best_57.pth => loading checkpoint './model/ShanghaiA/model_best_57.pth' 57.0989010989011 921 Pre_load dataset ...... begin test args['task_id'] = save_file/A_baseline IMG_1.jpg Gt 172.00 Pred 180049 IMG_10.jpg Gt 502.00 Pred 196417 IMG_100.jpg Gt 391.00 Pred 92455 IMG_101.jpg Gt 211.00 Pred 184704 IMG_102.jpg Gt 223.00 Pred 31672 IMG_103.jpg Gt 430.00 Pred 170330 IMG_104.jpg Gt 1175.00 Pred 174422 IMG_105.jpg Gt 265.00 Pred 169307
I don't know why this is, can you guide me.