Closed li-bowen-official closed 1 year ago
I have just uploaded Visualization_ShanghaiTech.ipynb, which demonstrates how to work with the .pth files for ShanghaiTech A and B datasets. Note that you can access the state_dict by torch.load(path_to_pth)["model"]
.
Thank you for your interest in this research!
Thank you, works for me and I can adapt it
How do I use the .pth files ShanghaiTech A and B datasets, like checkpoint_best_MSFANet_B.pth for inference? I am able to use your Getting Started script to infer on M_SFANet_UCF_QNRF.py and best_M-SFANet__UCF_QNRF.pth file, to get headcount and heatmap. But for the ShanghaiTech weights, is there a corresponding .py file with the Model class to put in /models? So far using the ShanghaiTech weights gives some error regarding state_dict.
Thanks for your great work!