Missing mit_b5 backbone weights
Closed this issue · 2 comments
Hey,
Seems like your code is referencing a mit_b5 checkpoint from your own computer.
File "/home/pablo/miniconda3/envs/NVDS/lib/python3.8/site-packages/mmcv/runner/checkpoint.py", line 260, in load_from_local
raise IOError(f'{filename} is not a checkpoint file')
OSError: /data/wangyiran/work2/mymodels/mit_pretrain/mit_b5.pth is not a checkpoint file
This comes from the model def at full_model.py
self.backbone.init_weights('/data/wangyiran/work2/mymodels/mit_pretrain/mit_b5.pth')
Where can I find it? Thanks.
Hi! Thanks for your attention to our work. The mit_b5.pth
is the ImageNet-pretrained weight provided by SegFormer. It is not needed for inference. Loading our NVDS checkpoint will overwrite the pretrained Mit-b5 weight. You can simply remove that line (self.backbone.init_weights) and then you can run our demo successfully. If you need the pretrained Mit-b5 to train your own model, you can download the weight here (provided by SegFormer).
We have fixed this issue and updated our full_model.py
with use_pretrain='False'
. Thanks for reminding us.
Thanks!