π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
make adalam work w/o scale and ori (#2300)
Dmytro Mishkinb9019cd82752
diff --git a/kornia/feature/adalam/adalam.py b/kornia/feature/adalam/adalam.pyindex 427b12a4a..e5e1971f0 100644--- a/kornia/feature/adalam/adalam.py+++ b/kornia/feature/adalam/adalam.py@@ -240,10 +240,16 @@ class AdalamFilter:_k2 = as_tensor(k2, device=self.config['device'], dtype=torch.float32)_d1 = as_tensor(d1, device=self.config['device'], dtype=torch.float32)_d2 = as_tensor(d2, device=self.config['device'], dtype=torch.float32)- _o1 = as_tensor(o1, device=self.config['device'], dtype=torch.float32)- _o2 = as_tensor(o2, device=self.config['device'], dtype=torch.float32)- _s1 = as_tensor(s1, device=self.config['device'], dtype=torch.float32)- _s2 = as_tensor(s2, device=self.config['device'], dtype=torch.float32)+ if o1 is not None:+ _o1 = as_tensor(o1, device=self.config['device'], dtype=torch.float32)+ _o2 = as_tensor(o2, device=self.config['device'], dtype=torch.float32)+ else:+ _o1, _o2 = o1, o2+ if s1 is not None:+ _s1 = as_tensor(s1, device=self.config['device'], dtype=torch.float32)+ _s2 = as_tensor(s2, device=self.config['device'], dtype=torch.float32)+ else:+ _s1, _s2 = s1, s2if (len(_d2) <= 1) or (len(_d1) <= 1):idxs, dists = _no_match(_d1)