Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STDC checkpoints have no meta key #1303

Closed
RunningLeon opened this issue Feb 18, 2022 · 2 comments · Fixed by #1332
Closed

STDC checkpoints have no meta key #1303

RunningLeon opened this issue Feb 18, 2022 · 2 comments · Fixed by #1332
Assignees

Comments

@RunningLeon
Copy link
Collaborator

STDC checkpoints have no meta key.

ran script

python /home/PJLAB/maningsheng/projects/openmmlab/mmsegmentation/demo/image_demo.py \
demo/demo.png \
configs/stdc/stdc2_in1k-pre_512x1024_80k_cityscapes.py \
checkpoints/stdc2_in1k-pre_512x1024_80k_cityscapes_20211125_220437-d2c469f8.pth

error message

load checkpoint from local path: checkpoints/stdc2_in1k-pre_512x1024_80k_cityscapes_20211125_220437-d2c469f8.pth
Traceback (most recent call last):
  File "/home/PJLAB/maningsheng/projects/openmmlab/mmsegmentation/demo/image_demo.py", line 40, in <module>
    main()
  File "/home/PJLAB/maningsheng/projects/openmmlab/mmsegmentation/demo/image_demo.py", line 27, in main
    model = init_segmentor(args.config, args.checkpoint, device=args.device)
  File "/home/PJLAB/maningsheng/projects/openmmlab/mmsegmentation/mmseg/apis/inference.py", line 35, in init_segmentor
    model.CLASSES = checkpoint['meta']['CLASSES']
KeyError: 'meta
@MengzhangLI
Copy link
Contributor

MengzhangLI commented Feb 18, 2022

It is because after pushing the STDC model, pr reviewer made some comments about variable names, so I have to transfer key names to ensure lateset version could directly use STDC model which is actually using older variable names.

META info is lost during transferring keys process. I would try to find original models back, otherwise I would train new STDC models and push again.

Best,

@daigang896
Copy link

Encountered the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants