plemeri / InSPyReNet

Official PyTorch implementation of Revisiting Image Pyramid Structure for High Resolution Salient Object Detection (ACCV 2022)
MIT License
321 stars 61 forks source link

Unexpected keys in state_dict when trying inference #32

Closed jwb95 closed 12 months ago

jwb95 commented 1 year ago

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

plemeri commented 1 year ago

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