π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Fix empty descriptor (#2927)
Dmytro Mishkinca91494a504d
diff --git a/kornia/feature/integrated.py b/kornia/feature/integrated.pyindex 4e7e1d3f0..3ebd26af3 100644--- a/kornia/feature/integrated.py+++ b/kornia/feature/integrated.py@@ -50,7 +50,7 @@ def get_laf_descriptors(timg: Tensor = imgif lafs.shape[1] == 0:warnings.warn(f"LAF contains no keypoints {lafs.shape}, returning empty tensor")- return torch.empty(lafs.shape[0], lafs.shape[1], 128)+ return torch.empty(lafs.shape[0], lafs.shape[1], 128, dtype=lafs.dtype, device=lafs.device)if grayscale_descriptor and img.size(1) == 3:timg = rgb_to_grayscale(img)