class_docstr: Detect faces in a given image using a CNN.
  
  By default, it uses the method described in :cite:`facedetect-yu`.
  
  Args:
      top_k: the maximum number of detections to return before the nms.
      confidence_threshold: the threshold used to discard detections.
      nms_threshold: the threshold used by the nms for iou.
      keep_top_k: the maximum number of detections to return after the nms.
  
  Return:
      A list of B tensors with shape :math:`(N,15)` to be used with :py:class:`kornia.contrib.FaceDetectorResult`.
  
  Example:
      >>> img = torch.rand(1, 3, 320, 320)
      >>> detect = FaceDetector()
      >>> res = detect(img)
class_docstr_tok: ["Detect","faces","in","a","given","image","using","a","CNN",".","By","default",",","it","uses","the","method","described","in",":","cite",":","`","facedetect-yu","`",".","Args",":","top_k",":","the","maximum","number","of","detections","to","return","before","the","nms",".","confidence_threshold",":","the","threshold","used","to","discard","detections",".","nms_threshold",":","the","threshold","used","by","the","nms","for","iou",".","keep_top_k",":","the","maximum","number","of","detections","to","return","after","the","nms",".","Return",":","A","list","of","B","tensors","with","shape",":","math",":","`","(","N,15",")","`","to","be","used","with",":","py",":","class",":","`","kornia.contrib.FaceDetectorResult","`",".","Example",":",">",">",">","img","=","torch.rand","(","1",",","3",",","320",",","320",")",">",">",">","detect","=","FaceDetector","(",")",">",">",">","res","=","detect","(","img",")"]
code: def __init__(
      self,
      top_k: int = 5000,
      confidence_threshold: float = 0.3,
      nms_threshold: float = 0.3,
      keep_top_k: int = 750,
  ) -> None:
      super().__init__()
      self.top_k = top_k
      self.confidence_threshold = confidence_threshold
      self.nms_threshold = nms_threshold
      self.keep_top_k = keep_top_k
      self.config = {
          "name": "YuFaceDetectNet",
          "min_sizes": [
              [10, 16, 24],
              [32, 48],
              [64, 96],
              [128, 192, 256],
          ],
          "steps": [8, 16, 32, 64],
          "variance": [0.1, 0.2],
          "clip": False,
      }
      self.min_sizes = [
          [10, 16, 24],
          [32, 48],
          [64, 96],
          [128, 192, 256],
      ]
      self.steps = [8, 16, 32, 64]
      self.variance = [0.1, 0.2]
      self.clip = False
      self.model = YuFaceDetectNet("test", pretrained=True)
      self.nms = nms_kornia
  
imports: import math
  from enum import Enum
  from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import nn
  from kornia.geometry.bbox import nms
  from kornia.utils.helpers import map_location_to_cpu
label_desc: Use image node_id 1 to create a new FaceDetector object from inherited base classes: nn with example: obj = FaceDetector(top_k, confidence_threshold, nms_threshold, keep_top_k)