yingxin-jia/SuperGlue-pytorch

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

Opened this issue · 4 comments

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

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

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.