Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

531 B
Raw Blame

On CUDA, nms2d and NonMaximaSuppression2d with a (5, 5) or (7, 7) window take the separable max-pool path instead of their 24- or 48-comparison chains for floating-point maps, with the same masks. On an RTX 4090 the suppression is 2-6x faster for 480 x 640 to 960 x 1280 maps, and the extraction of XFeat, DISK and ALIKED, which suppress with a 5 x 5 window, is 3-5% faster. CPU, MPS and integer maps keep the comparison chains: they are faster on CPU, and before torch 2.16 MPS max_pool2d mishandles nan and -inf.