Open aviadmx opened 2 years ago
Sorry for that, we forgot to convert these keys after we changed the codes. We will fix it asap.
@zhiqi-li Thanks, any estimation? By the way it only happens via training script and not via testing.
I see that the testing script uses:
from easymd.runner.checkpoints import load_checkpoint
load_checkpoint(model, args.checkpoint, map_location='cpu')
While the training uses the framework loader:
runner.load_checkpoint(cfg.load_from)
However I'm not sure if just replacing this would correctly load the model or not
I convert the keys in this function from easymd.runner.checkpoints import load_checkpoint
.
I think you can convert the keys in pkl file based on the following rules.
defautl_revise_keys = [
('\\.mask_head\\.','.things_mask_head.'),
('\\.mask_head2\\.','.stuff_mask_head.'),
('\\.cls_branches2\\.', '.cls_thing_branches.'),
]
When loading the Swin-L checkpoint by adding a
load_from
line to the configconfigs/panformer/panformer_swinl_24e_coco_panoptic.pyz
as following:The loading fails with an error about keys mismatch: