plemeri/InSPyReNet

Unexpected keys in state_dict when trying inference

Closed this issue · 1 comments

jwb95 commented

Hello,

I would simply like to inference the model.
Downloaded the checkpoint swin_base_patch_4_window12_384_22kto1k.pth and placed it in the snapshots folder, renamed it to latest.pth.

Running
python run/Inference.py --config configs/InSPyReNet_SwinB.yaml --source [SOURCE] --dest [DEST] --type [TYPE] --gpu --jit --verbose
gives a torch key-error when trying to load from the checkpoint. It seems that the expected architecture differs from the one in the .ckpt-file.

Thank you

Hi @jwb95,

The checkpoint that you've downloaded is for training the model with ImageNet initialized backbone model which has less parameters for the whole network architecture of InSPyReNet.

The checkpoints you're looking for are available on Model Zoo.

Thank you