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

KeyError: 'key_proj.key_proj.weight' #12

Open
Wangxunhang opened this issue Aug 1, 2023 · 1 comment
Open

KeyError: 'key_proj.key_proj.weight' #12

Wangxunhang opened this issue Aug 1, 2023 · 1 comment

Comments

@Wangxunhang
Copy link

Hi:
when I upload the video on the SegDrawer and then click the button "seg-video", the error shows below:

File "/home/it01/SegDrawer/server.py", line 248, in process_videos
res_path = seg_propagation(VIDEO_NAME, tmp_seg_file.name)
File "/home/it01/SegDrawer/server.py", line 128, in seg_propagation
network = XMem(config, './XMem/saves/XMem.pth').eval().to(device)
File "/home/it01/SegDrawer/XMem/model/network.py", line 24, in init
model_weights = self.init_hyperparameters(config, model_path, map_location)
File "/home/it01/SegDrawer/XMem/model/network.py", line 146, in init_hyperparameters
self.key_dim = model_weights['key_proj.key_proj.weight'].shape[0]
KeyError: 'key_proj.key_proj.weight'

I guess the reason is from the XMem.pth, could you please help me to deal the issue, thx!

@lujiazho
Copy link
Owner

lujiazho commented Aug 1, 2023

I didn't make it reproduce this error. Have you tried on Colab? This error seems to be related to the model file, please make sure the model is correctly downloaded to XMem/saves/ directory.

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

No branches or pull requests

2 participants