pytorch-superpoint icon indicating copy to clipboard operation
pytorch-superpoint copied to clipboard

I think there is a bug in subpixel prediction

Open CodeRed97 opened this issue 4 years ago • 2 comments

Thanks for your work and sharing! I think I found a bug while learning your paper and your code: In utils.losses.py, function 'extract_patch_from_points', it seemed the patch extracted does not take the predicted integer coodinate as the center, but take it as the left-top corner, which doesn't make sense in theory. This may cause the prediction accuracy with subpixel poorer than without subpixel. However, this can be easily corrected with some changes in utils.losses.py, function 'extract_patch_from_points' and 'soft_argmax_2d'.(already tested) I hope I didn't make a mistake and this could be helpful. Thanks for your contribution again.

CodeRed97 avatar Nov 30 '21 13:11 CodeRed97

CodeRed97 1. Can you show your modified code? thank you .2.how do you set the config to train the subpixel superpoint&magicpoint? thank you .

P66094125 avatar Feb 18 '22 03:02 P66094125

Thanks for your work and sharing! I think I found a bug while learning your paper and your code: In utils.losses.py, function 'extract_patch_from_points', it seemed the patch extracted does not take the predicted integer coodinate as the center, but take it as the left-top corner, which doesn't make sense in theory. This may cause the prediction accuracy with subpixel poorer than without subpixel. However, this can be easily corrected with some changes in utils.losses.py, function 'extract_patch_from_points' and 'soft_argmax_2d'.(already tested) I hope I didn't make a mistake and this could be helpful. Thanks for your contribution again.

res_ext = torch.cat(((1-x_res)*(1-y_res), (1-x_res)*y_res, x_res*(1-y_res), x_res*y_res), dim=0) Is the design of this res unreasonable? The corresponding distance between the approximate points should be smaller

foxkw avatar Mar 31 '23 05:03 foxkw