class_docstr: Multi-scale feature detector based on KeyNet.
  
  This is based on the original code from paper
  "Key.Net: Keypoint Detection by Handcrafted and Learned CNN Filters".
  See :cite:`KeyNet2019` for more details.
  
  .. image:: _static/img/keynet.jpg
  
  Args:
      pretrained: Download and set pretrained weights to the model.
      num_features: Number of features to detect.
      keynet_conf: Dict with initialization parameters. Do not pass it, unless you know what you are doing`.
      ori_module: for local feature orientation estimation. Default: :class:`~kornia.feature.PassLAF`,
         which does nothing. See :class:`~kornia.feature.LAFOrienter` for details.
      aff_module: for local feature affine shape estimation. Default: :class:`~kornia.feature.PassLAF`,
          which does nothing. See :class:`~kornia.feature.LAFAffineShapeEstimator` for details.
code: def __init__(
      self,
      pretrained: bool = False,
      num_features: int = 2048,
      keynet_conf: KeyNet_conf = keynet_default_config,
      ori_module: Optional[Module] = None,
      aff_module: Optional[Module] = None,
  ) -> None:
      model = KeyNet(pretrained, keynet_conf)
      super().__init__(
          model,
          num_features,
          keynet_conf["Detector_conf"],
          ori_module,
          aff_module,
      )
  
imports: from typing import List, Optional
  import torch
  import torch.nn.functional
  from torch import nn
  from typing_extensions import TypedDict
  from kornia.core import Module, Tensor, concatenate
  from kornia.filters import SpatialGradient
  from kornia.geometry.transform import pyrdown
  from kornia.utils.helpers import map_location_to_cpu
  from .scale_space_detector import Detector_config, MultiResolutionDetector, get_default_detector_config
label_desc: Use image node_id 1 to create a new KeyNetDetector object from inherited base classes: MultiResolutionDetector with example: obj = KeyNetDetector(pretrained, num_features, keynet_conf, ori_module, aff_module)