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
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\untils.py", line 55, in init_net
return SAM2UNet(checkpoint_path=path)
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\SAM2UNet.py", line 129, in init
model = build_sam2(model_cfg, checkpoint_path)
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\sam2\build_sam.py", line 36, in build_sam2
_load_checkpoint(model, ckpt_path)
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\sam2\build_sam.py", line 82, in _load_checkpoint
missing_keys, unexpected_keys = model.load_state_dict(sd)
File "C:\Users\user.conda\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 2189, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for SAM2Base:
Unexpected key(s) in state_dict: "no_obj_embed_spatial", "obj_ptr_tpos_proj.weight", "obj_ptr_tpos_proj.bias".
The text was updated successfully, but these errors were encountered:
Hi, it seems that you downloaded the checkpoint of just released SAM2.1 rather than SAM2. Currently, SAM2.1 is not fully compatible with SAM2. You can download the SAM2 checkpoint from here.
Thank you for your wonderful work.
'Encoder. SAM2-UNet applys the Hiera [38] backbone pretrained by SAM2.'
However, I download the checkpoint from 'https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_large.pt' in 'https://github.com/facebookresearch/sam2/tree/main/checkpoints', but failed to init the model, can you send me the checkpoint you use in the paper?
My e-mail adress is: [email protected]
Sincerely,
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\untils.py", line 55, in init_net
return SAM2UNet(checkpoint_path=path)
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\SAM2UNet.py", line 129, in init
model = build_sam2(model_cfg, checkpoint_path)
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\sam2\build_sam.py", line 36, in build_sam2
_load_checkpoint(model, ckpt_path)
File "F:\seg\SAM2-UNet-main\SAM2-UNet-main\sam2\build_sam.py", line 82, in _load_checkpoint
missing_keys, unexpected_keys = model.load_state_dict(sd)
File "C:\Users\user.conda\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 2189, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for SAM2Base:
Unexpected key(s) in state_dict: "no_obj_embed_spatial", "obj_ptr_tpos_proj.weight", "obj_ptr_tpos_proj.bias".
The text was updated successfully, but these errors were encountered: