magicleap / SuperGluePretrainedNetwork

SuperGlue: Learning Feature Matching with Graph Neural Networks (CVPR 2020, Oral)
Other
3.31k stars 672 forks source link

performance highly degraded when model.eval() in test phase #77

Closed PH8411 closed 3 years ago

PH8411 commented 3 years ago

I train the superglue on my own dataset(some hard examples for matching task ), superpoint for feature extraction and description.

  1. in the traning step, I execute model.train() for loss backward and model.eval() for validtion, from the validation result , the matching performance is good.
  2. however, after training, I load the model weights , and execute model.eval() on my data(testingand training data), the performance highly degraded, but the when I execute model.train() on my data, the results become better again.

Do you have any idea about this or some suggestion about this problem? Looking forward to your reply,thanks.

PH8411 commented 3 years ago

I remove the BatchNormalization layer, and solve the problem. May be batchsize=1 cause the problem?