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

how can i ues the trianed pth to the origin supergluepretrain code #29

Open
ZhouShunlong opened this issue Mar 10, 2023 · 4 comments
Open

Comments

@ZhouShunlong
Copy link

No description provided.

@Shuhul24
Copy link

Shuhul24 commented Nov 7, 2023

Hey @ZhouShunlong did you get any way how to use the weights that we get by training the superglue with the pretrained model?

@ZhouShunlong
Copy link
Author

ZhouShunlong commented Nov 7, 2023 via email

@Shuhul24
Copy link

Shuhul24 commented Nov 8, 2023

Well what I observed is that there are some changes in the architecture that is being used in official SuperGlue such as in line 198 in models/superglue.py the default config are different than the one in the official one.

Also in line 249 (in models/superglue.py) the script is

desc0 = desc0 + self.kenc(kpts0, torch.transpose(data['scores0'], 0, 1))
desc1 = desc1 + self.kenc(kpts1, torch.transpose(data['scores1'], 0, 1))

whereas in the official models/superglue.py it is

desc0 = desc0 + self.kenc(kpts0, data['scores0'])
desc1 = desc1 + self.kenc(kpts1, data['scores1'])

I tried importing the trained model weights in the official model but it wasn't working as there were plenty of errors coming around these lines.

@ZhouShunlong
Copy link
Author

ZhouShunlong commented Nov 8, 2023 via email

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