You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have encoutered a problem while loading the checkpoint of Segformer model. Specifically, the model and loaded state dict do not match exactly. The error messages are as below:
Loads checkpoint by local backend from path: checkpoints/mit_b5_20220624-658746d9.pth
The model and loaded state dict do not match exactly
unexpected key in source state_dict:.....
missing keys in source state_dict:...
Traceback (most recent call last):
File "demo/artifact_detection.py", line 320, in
main()
File "demo/artifact_detection.py", line 215, in main
model = init_model(args.config, args.checkpoint, device=args.device)
File "mmsegmentation/mmseg/apis/inference.py", line 62, in init_model
dataset_meta = checkpoint['meta'].get('dataset_meta', None)
KeyError: 'meta'
I have searched the previous issues and found issue #1303 which fixed the similar problem by uploading the modified models. Would you please checking the checkpoints of Segformer and fix the problem? Thanks a lot!
The text was updated successfully, but these errors were encountered:
I have fixed the problem. The reason of it is that the checkpoint provided by the link in the config file may be of another version which is incompatible with the config file. Simply downloading the one provided in the Readme file in mmsegmentation/configs/segformer works.
Hi, I have encoutered a problem while loading the checkpoint of
Segformer
model. Specifically, the model and loaded state dict do not match exactly. The error messages are as below:Loads checkpoint by local backend from path: checkpoints/mit_b5_20220624-658746d9.pth
The model and loaded state dict do not match exactly
unexpected key in source state_dict:.....
missing keys in source state_dict:...
Traceback (most recent call last):
File "demo/artifact_detection.py", line 320, in
main()
File "demo/artifact_detection.py", line 215, in main
model = init_model(args.config, args.checkpoint, device=args.device)
File "mmsegmentation/mmseg/apis/inference.py", line 62, in init_model
dataset_meta = checkpoint['meta'].get('dataset_meta', None)
KeyError: 'meta'
I have searched the previous issues and found issue #1303 which fixed the similar problem by uploading the modified models. Would you please checking the checkpoints of Segformer and fix the problem? Thanks a lot!
The text was updated successfully, but these errors were encountered: