Parskatt / DKM

[CVPR 2023] DKM: Dense Kernelized Feature Matching for Geometry Estimation
https://parskatt.github.io/DKM/
Other
367 stars 28 forks source link

Keep aspect ratio of images? #62

Open javiabellan opened 1 month ago

javiabellan commented 1 month ago

I noticed that DKM resizes the image to a fixed size and aspect ratio (horizontal). I think preserving the original aspect ratio of the images could improve performance, especially for extreme image pairs like this one:

BARCELONA -VUNAV-1024x682 2 BARCELONA -VUNAV-1024x682 3

There is any tweak (code modification) to allow this into the current DKM weights?

Parskatt commented 1 month ago

Yes it possible. And for the pair you show I agree it would probably improve performance.

If you want to dig into the code, the main barriers are

  1. For feature extraction the images are stacked. Instead we need to extract seperately.

  2. In several places I just use "H,W". This needs to be H_A/H_B or something.

In tiny roma (over in the roma repo), I've made these changes. You can refer to the implementation there.