verlab / accelerated_features

Implementation of XFeat (CVPR 2024). Do you need robust and fast local feature extraction? You are in the right place!
https://www.verlab.dcc.ufmg.br/descriptors/xfeat_cvpr24
Apache License 2.0
942 stars 95 forks source link

training #48

Open zw-92 opened 2 months ago

zw-92 commented 2 months ago

Hello, I want to do some fine-tuning based on your trained model and my own dataset. Since there is no label, I want to replace the coco20k dataset with my own dataset, or add some of my own dataset to it. Do you recommend "full training" or "training with existing weights"? Do I need to modify the training hyperparameters and strategies? Looking forward to your reply.

guipotje commented 1 month ago

Hello @zw-92, thank you for the interest in our work!

I believe you should test the two approaches, but I first recommend a fine-tuning just to see if XFeat improves on your image distribution. This should be faster, use less data, and you can get some experience in training the model. Then, you could just do a from-scratch training, as the model is quite small and you don't need high-end hardware. Regarding hyperparameters, I think the defaults are a good start, then you can test some variations based on the training dynamics.

zw-92 commented 1 month ago

Thank you for your reply. I trained on MegaDepth and coco20k using the default parameters, but the results, when tested in the same scene with the weights you provided, show a difference of about 300 in the average number of matched feature points—one being 1500 and the other 1200. Do you know why this might be? I also fine-tuned using the original weights and default parameters, but the results were mediocre. After reducing the learning rate, the average number of matches began to approach the results of the original weights, occasionally even surpassing them by about 100 points. However, I lack ground truth data, making it difficult to assess. Do you have any suggestions?