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

About generate.py #278

Open
Taogonglin opened this issue Nov 9, 2022 · 3 comments
Open

About generate.py #278

Taogonglin opened this issue Nov 9, 2022 · 3 comments

Comments

@Taogonglin
Copy link

After generate.py is used, will the size of the image produced be different from the original image, which will have an impact on the evaluation? It's different with HPatches. Thank you!

@Taogonglin
Copy link
Author

and why patch ratio is 0.8?
image

@Taogonglin
Copy link
Author

Could you tell me the impact of the patch_ratio? And if the code should be

new_shape = tf.multiply(tf.cast(shape, tf.float32), patch_ratio)

->change to -> new_shape = tf.multiply(tf.cast(shape, tf.float32), 1)

@rpautrat
Copy link
Owner

rpautrat commented Dec 1, 2022

Hi, sorry for the late reply.

Patch ratio was initially designed to decide the size of the center crop described in the SuperPoint paper, Figure 6. Choosing it smaller than 1 allows you to avoid most bordering artifacts created after warping the image with a homography.

However, since by doing so we reduce the scale of the image by 0.8, directly using these images would be biased towards this scale. To keep the original scale around 1, we have to multiply the image size by the patch ratio, as done in the line you mentioned: new_shape = tf.multiply(tf.cast(shape, tf.float32), patch_ratio).

The Coco patches dataset is just here to quickly test the method and is not directly comparable to HPatches. So it doesn't really matter if the image sizes are not the same.

I hope this answers your questions.

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