Skip to content
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

D2Net to kornia #84

Open
ducha-aiki opened this issue Jan 30, 2021 · 3 comments
Open

D2Net to kornia #84

ducha-aiki opened this issue Jan 30, 2021 · 3 comments

Comments

@ducha-aiki
Copy link

Hi,

Would you be interested for porting the inference part of the D2Net into the kornia?
The idea is to allow simple usage of local features, like this:

local_feat = kornia.feature.D2Net(pretrained=True)
lafs, resps, descs = local_feat(image)

We now have HardNet, SOSNet, TFeat and other descriptors.
It may also increase the usage of D2Net :)

@mihaidusmanu
Copy link
Owner

mihaidusmanu commented Jan 31, 2021

Hey. Thanks for reaching out - sounds like a neat idea! I was planning to work on a cleaner implementation at some point, so why not integrate it with Kornia.

If I understand it correctly, I simply need to create a new D2Net nn.Module similar to e.g. the HardNet one.

I'll give it a try in the following weeks and reach out with a PR when it's ready!

@ducha-aiki
Copy link
Author

Sounds great, thank you!

A couple of things regarding the format implementation in a separate file. It is good to follow the output format of the
https://kornia.readthedocs.io/en/latest/feature.html#kornia.feature.ScaleSpaceDetector:

with the exception that descriptors are also returned, so 3 outputs.

To create LAFs (kornia format for the local features), you can use function https://kornia.readthedocs.io/en/latest/feature.html#kornia.feature.laf_from_center_scale_ori

where you feed all zeros instead of orientation and D2Net receptive field as a scale parameter.

@ducha-aiki
Copy link
Author

Hi Mihai,

Did you have a chance to think about this, or do you need any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants