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
880 stars 87 forks source link

How to backpropagation with this work? #31

Open Lee-JaeWon opened 2 months ago

Lee-JaeWon commented 2 months ago

I want to use mkpts_0, mkpts_1 = xfeat.match_xfeat(im1, im2, top_k = 4096) to optimize different targets based on the distance between matches. However, even if I remove the inference stuff, the back-propagation doesn't seem to work well. Could you please tell me what I should do?

Thank you for your tremendous work.

Best regards

guipotje commented 2 months ago

Hello @Lee-JaeWon,

Thanks for your interest in our work! The function you mentioned is only used during inference and is not differentiable. You should use a scheme similar to the training script provided here. Please check it out, and if you have any questions, don't hesitate to ask!

Best, Guilherme Potje