Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

1.2 KB
Raw Blame

ScaleSpaceDetector no longer gives a NaN image gradient for a float16 image with exactly ScalePyramid, exactly a BlobHessian, BlobDoG, CornerHarris or CornerGFTT response, and a response and refiner holding only scalar parameters and buffers. Such an image used to run through the scale space in float16, where the gradient overflowed, with scores that followed an autocast region in some cases. It is now detected in float32 with autocast off, a candidate whose score is zero in float16 is dropped, and its scores are returned in float16, also in an autocast region. As a correctness fix this ships without a deprecation window ("Escape hatch" on the stability page): the keypoints and scores of such an image change and move toward the float32 ones. A float16 Harris detector still finds fewer keypoints than float32: on 8 half-size HPatches images it fills a mean of 545 slots against float32's 825, and used to fill 1020, almost none of them near a float32 keypoint. With any other pyramid or response function, a subclass or a CornerHarris with a non-scalar k included, or with a refiner holding non-scalar state, the pyramid and response function get the float16 image as before and can still give a NaN gradient.