-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP combining xfeat with steerers #32
Comments
Hello Georg, your rotation-steerers is quite impressive. It achieves delightful rotation-equivariant performance without relying on a rotation-equivariant group-convolution backbone. Both LightGlue LightGlue / glue_factory and XFeat have utilized LO-RANSAC from poselib as the pose estimator, which significantly outperforms the cv2.RANSAC estimator commonly used before, especially in the comprehensive evaluation on MegaDepth. I have tested the perm version and the learn version of your steer on MegaDepth (origin/rot-C4/rot-rand). The results show that steer-XFeat exhibits delightful rotation-equivariant capabilities, but there is a slight performance drop when no rotation is applied.
The following are the results I have currently run, and due to time constraints, I really want to share them as soon as possible. Therefore, some experimental results that do not affect judgment have not been provided yet.
The following is the evaluation method I used, mainly derived from SuperGlue's evaluation code superglue_eval and the poselib library PoseLib.
In fact, I have been trying to combine e2CNN and XFeat recently, and I found that this method is very inefficient. The reason is that XFeat emphasizes its real-time performance on the CPU side more, especially its shallow convolutional layers. The number of channels has increased from 1 to 4, and then from 4 to 8. However, based on the rotation equivariant backbone method, C8 is a more suitable sampling group (referring to ReF, group pooling efficiency is too low; Referring to RELF, C4 cannot provide strong support in the 45 degree direction. Therefore, if we want to replace XFeat directly with e2CNN, the channel change of the first convolution layer is actually 1->32, and so on. This method will lose the advantages of XFeat. Your rotation-steerers, is really elegant and practical. I look forward to combining it with XFeat to become a more powerful RE keypoint extractor. |
Hi Shuai, Thanks for the eval! Here's a demo for the learned steerer: colab. I think one needs to tune the Combining with e2cnn would definitely also be interesting. As you say, however, it may be difficult to create a well-performing small network. I haven't trained an SO2-version of steerers+xfeat yet, but might try it in the future. |
Thank you, Georg. I am trying to use the learned steerer code you provided and found that I made a mistake using the perm-steerer code before. After using the correct learned steerer code, the performance is better than that of the perm-steerer, as you initially mentioned. I will update the results in the test table above as soon as possible. |
Hello @georg-bn and @ShuaiAlger, @georg-bn, it's very nice to see steerers integrated into XFeat! Thank you for providing the code examples on how to use steerers with XFeat. I believe this will help a lot with problems where rotation invariance is needed and aligns well with maintaining efficiency instead of performing brute-force test-time augmentation :) I should release the evaluation scripts by next week; I've been busy these past days. @ShuaiAlger, thank you for providing the results with the adapted SuperGlue evaluation script. I'm also training XFeat + LightGlue (smaller model) and should release it soon, in case anyone is interested! |
Hi, @georg-bn thanks for the work! I am wondering how I should use a learned steerer pth file and use the descriptors to train lightglue, instead of using MNN? |
Hi @noahzn, I think there are different options, we discussed it a bit here: georg-bn/rotation-steerers#3 If you are interested in working on this as a research project, let me know as I am also interested. |
@georg-bn Hi, thank you for your reply! Yes, I'm interested in this project. Now I'm training XFeat with a learned steerer. |
Hi @noahzn, from my experience it would generally improve in-plane rotation robustness but it will probably hurt performance for images that are upright. This is a trade-off, I believe for general upright images, [-30,30] is a good balance. It would make sense to use steerers if you know that your images may have large in-plane rotations. |
@guipotje thanks for your reply! My use case is a bit different. I'm matching a small patch to a larger one, for example, I have taken a uav image which is 500x500, and I want to match it with a larger patch 2000x2000. the target region can be anywhere on the larger patch, so it can be in the top left from (0, 0) to (500, 500), or in the bottom right from (1500, 1500) to (2000, 2000), etc. Do you think this is related to in-plane rotation, or translation? |
I have a WIP of combining xfeat with steerers. I'm posting here in case someone else than me is interested in looking at this.
I've trained two versions of XFeat using this fork, one with a fixed permutation steerer and one with a learned steerer (this seems to be slightly better). A quick colab demo for the fixed steerer is here. Weights are here. I haven't really evaluated well (when will your evaluation code be released approximately?), but on a quick test on HPatches, the new versions seem comparable to the original on upright images.
Anyway, happy to discuss ideas in this thread.
The text was updated successfully, but these errors were encountered: