mihaidusmanu / d2-net

D2-Net: A Trainable CNN for Joint Description and Detection of Local Features
Other
764 stars 163 forks source link

Question about the training result #30

Closed liwenwei123 closed 4 years ago

liwenwei123 commented 4 years ago

Dear Mihai Dusmanu! Thank you for your answer last time! I have run the code you provided , after training the default 10 epoch, i got the model saved in 'checkpoints/d2.best.pth', and replace the model downloaded in 'models/d2_tf.pth' in extract_feature.py. However,when i want to test the training result in HPatches-Sequences-Matching-Benchmark.ipynb,the feature and mathes i compute by the model in d2.best.pth is less than the ones in d2-net-trained precomputed errors.When i run Qualitative-Matches.ipynb to see the result,i found the plot result is also not as good as the old model:d2_tf.pth. i am wondering if there is any step i missed? How can i train the same result as model in d2_tf.pth? Thanks Sincerely!

mihaidusmanu commented 4 years ago

Hello. As mentioned in the README, this repository is a reimplementation in PyTorch of the initial TensorFlow code used to train the d2_tf*.pth models. However, throughout my previous experiments (on PyTorch 1.0 mostly), the results obtained when retraining with the code contained in this repository were quite close on HPatches Sequences to the ones of the released model. Thus, I suspect there might have been some recent changes that affected convergence. Could you provide me with the set of weights obtain after retraining? Also, could you share the pdf with the HPatches Sequences results after retraining?

Extra question just to make sure: are you using the latest version of the code (with the updated dataset undistortion & preprocessing)?

liwenwei123 commented 4 years ago

Dear Mihai Dusmanu! Thank you for reply.I check the code i run again, and found that when run the HPatches-Sequences-Matching-Benchmark,i missed some steps.This time I get the training result just as good as the loaded precomputed errors,even better than the procomputed d2-net-trained error:

Features: 6723.172840 - [1431, 21451]

Matches: Overall 2870.346296, Illumination 2372.523077, Viewpoint 3332.610714

This problem is solved. Thanks Sincerely!