Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

fix kernel_size in dog_response (#3137)

Force1essfdb2d31c0db2
diff --git a/kornia/feature/responses.py b/kornia/feature/responses.py
index 93e5cd22b..ec367db5b 100644
--- a/kornia/feature/responses.py
+++ b/kornia/feature/responses.py
@@ -306,7 +306,7 @@ def dog_response_single(input: Tensor, sigma1: float = 1.0, sigma2: float = 1.6)
"""
KORNIA_CHECK_SHAPE(input, ["B", "C", "H", "W"])
ks1 = _get_kernel_size(sigma1)
- ks2 = _get_kernel_size(sigma1)
+ ks2 = _get_kernel_size(sigma2)
g1 = gaussian_blur2d(input, (ks1, ks1), (sigma1, sigma1))
g2 = gaussian_blur2d(input, (ks2, ks2), (sigma2, sigma2))
return g2 - g1
diff --git a/tests/feature/test_responces_local_features.py b/tests/feature/test_responces_local_features.py
index 9ef74d92f..a9512794c 100644
--- a/tests/feature/test_responces_local_features.py
+++ b/tests/feature/test_responces_local_features.py
@@ -355,22 +355,22 @@ class TestBlobDoGSingle(BaseTester):
[
[
[
- [0.1684, 0.0856, -0.0118, 0.0059, 0.0842, 0.0956, 0.0734],
- [0.0856, -0.0203, -0.1385, -0.0931, 0.0428, 0.0888, 0.0733],
- [-0.0118, -0.1385, -0.2741, -0.1998, -0.0059, 0.0768, 0.0695],
- [0.0059, -0.0931, -0.1998, -0.1443, 0.0030, 0.0639, 0.0567],
- [0.0842, 0.0428, -0.0059, 0.0030, 0.0421, 0.0478, 0.0367],
- [0.0956, 0.0888, 0.0768, 0.0639, 0.0478, 0.0289, 0.0189],
- [0.0734, 0.0733, 0.0695, 0.0567, 0.0367, 0.0189, 0.0117],
+ [0.1640, 0.0811, -0.0148, 0.0040, 0.0850, 0.0962, 0.0754],
+ [0.0811, -0.0249, -0.1416, -0.0950, 0.0437, 0.0894, 0.0754],
+ [-0.0148, -0.1416, -0.2758, -0.2005, -0.0044, 0.0777, 0.0718],
+ [0.0040, -0.0950, -0.2005, -0.1445, 0.0045, 0.0648, 0.0586],
+ [0.0850, 0.0437, -0.0044, 0.0045, 0.0441, 0.0488, 0.0382],
+ [0.0962, 0.0894, 0.0777, 0.0648, 0.0488, 0.0295, 0.0197],
+ [0.0754, 0.0754, 0.0718, 0.0586, 0.0382, 0.0197, 0.0124],
],
[
- [0.0725, -0.0023, -0.0226, 0.0810, 0.1114, 0.0699, 0.0471],
- [-0.0023, -0.0868, -0.1010, 0.0361, 0.0974, 0.0758, 0.0598],
- [-0.0226, -0.1010, -0.1408, -0.0652, 0.0030, 0.0559, 0.0777],
- [0.0810, 0.0361, -0.0652, -0.1802, -0.1625, -0.0049, 0.0764],
- [0.1114, 0.0974, 0.0030, -0.1625, -0.1710, -0.0092, 0.0761],
- [0.0699, 0.0758, 0.0559, -0.0049, -0.0092, 0.0531, 0.0844],
- [0.0471, 0.0598, 0.0777, 0.0764, 0.0761, 0.0844, 0.0865],
+ [0.0689, -0.0056, -0.0254, 0.0802, 0.1118, 0.0708, 0.0491],
+ [-0.0056, -0.0895, -0.1031, 0.0362, 0.0986, 0.0771, 0.0621],
+ [-0.0254, -0.1031, -0.1423, -0.0651, 0.0039, 0.0567, 0.0794],
+ [0.0802, 0.0362, -0.0651, -0.1795, -0.1617, -0.0048, 0.0771],
+ [0.1118, 0.0986, 0.0039, -0.1617, -0.1706, -0.0095, 0.0761],
+ [0.0708, 0.0771, 0.0567, -0.0048, -0.0095, 0.0521, 0.0836],
+ [0.0491, 0.0621, 0.0794, 0.0771, 0.0761, 0.0836, 0.0858],
],
]
],