rpautrat / SuperPoint

Efficient neural feature detector and descriptor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About generate.py

Taogonglin opened this issue · comments

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!

and why patch ratio is 0.8?
image

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)

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.