Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

[fix]receive num_features as an arg to KeyNetDetector constructor (#1686)

Hyeokjoon Kwon51c008a8605e
diff --git a/kornia/feature/integrated.py b/kornia/feature/integrated.py
index fbb67dd70..e5872987f 100644
--- a/kornia/feature/integrated.py
+++ b/kornia/feature/integrated.py
@@ -182,6 +182,7 @@ class KeyNetHardNet(LocalFeature):
device: torch.device = torch.device('cpu')):
ori_module = PassLAF() if upright else LAFOrienter(angle_detector=OriNet(True))
detector = KeyNetDetector(True,
+ num_features=num_features,
ori_module=ori_module).to(device)
descriptor = LAFDescriptor(None,
patch_size=32,
@@ -197,6 +198,7 @@ class KeyNetAffNetHardNet(LocalFeature):
device: torch.device = torch.device('cpu')):
ori_module = PassLAF() if upright else LAFOrienter(angle_detector=OriNet(True))
detector = KeyNetDetector(True,
+ num_features=num_features,
ori_module=ori_module,
aff_module=LAFAffNetShapeEstimator(True).eval()).to(device)
descriptor = LAFDescriptor(None,