class_docstr: Multi-scale feature detector, based on code from KeyNet. Can be used with any response function.
  
  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.
  
  Args:
      model: response function, such as KeyNet or BlobHessian
      num_features: Number of features to detect.
      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.
class_docstr_tok: ["Multi-scale","feature","detector",",","based","on","code","from","KeyNet",".","Can","be","used","with","any","response","function",".","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",".","Args",":","model",":","response","function",",","such","as","KeyNet","or","BlobHessian","num_features",":","Number","of","features","to","detect",".","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","."]
docstr: Three stage local feature detection. First the location and scale of interest points are determined by
  detect function. Then affine shape and orientation.
  
  Args:
      img: image to extract features with shape [1xCxHxW]. KeyNetDetector does not support batch processing,
  because the number of detections is different on each image.
      mask: a mask with weights where to apply the response function. The shape must be the same as
        the input image.
  
  Returns:
      lafs: shape [1xNx2x3]. Detected local affine frames.
      responses: shape [1xNx1]. Response function values for corresponding lafs
docstr_tok: ["Three","stage","local","feature","detection",".","First","the","location","and","scale","of","interest","points","are","determined","by","detect","function",".","Then","affine","shape","and","orientation",".","Args",":","img",":","image","to","extract","features","with","shape","[","1xCxHxW","]",".","KeyNetDetector","does","not","support","batch","processing",",","because","the","number","of","detections","is","different","on","each","image",".","mask",":","a","mask","with","weights","where","to","apply","the","response","function",".","The","shape","must","be","the","same","as","the","input","image",".","Returns",":","lafs",":","shape","[","1xNx2x3","]",".","Detected","local","affine","frames",".","responses",":","shape","[","1xNx1","]",".","Response","function","values","for","corresponding","lafs"]
code: def forward(
      self, img: Tensor, mask: Optional[Tensor] = None
  ) -> Tuple[Tensor, Tensor]:
      """Three stage local feature detection. First the location and scale of interest points are determined by
      detect function. Then affine shape and orientation.
  
      Args:
          img: image to extract features with shape [1xCxHxW]. KeyNetDetector does not support batch processing,
      because the number of detections is different on each image.
          mask: a mask with weights where to apply the response function. The shape must be the same as
            the input image.
  
      Returns:
          lafs: shape [1xNx2x3]. Detected local affine frames.
          responses: shape [1xNx1]. Response function values for corresponding lafs
      """
      KORNIA_CHECK_SHAPE(img, ["1", "C", "H", "W"])
      responses, lafs = self.detect(img, mask)
      lafs = self.aff(lafs, img)
      lafs = self.ori(lafs, img)
      return lafs, responses
  
imports: import math
  from typing import List, Optional, Tuple
  import torch
  import torch.nn.functional
  from typing_extensions import TypedDict
  from kornia.core import Device, Module, Tensor, concatenate, eye, tensor, where, zeros
  from kornia.core.check import KORNIA_CHECK_SHAPE
  from kornia.geometry.subpix import ConvSoftArgmax3d, NonMaximaSuppression2d
  from kornia.geometry.transform import ScalePyramid, pyrdown, resize
  from .laf import laf_from_center_scale_ori, laf_is_inside_image
  from .orientation import PassLAF
  from .responses import BlobHessian
label_desc: Use image node_id 5 for calling the MultiResolutionDetector obj's underlying member method code with example usage: obj.forward(img, mask) and returns: lafs,  responses