class_docstr: The ``FaceDetector`` is a :class:`~flash.Task` for detecting faces in images.
  
  For more details, see :ref:`face_detection`.
  
  Args:
      model: a string of :attr`_models`. Defaults to 'lffd_slim'.
      pretrained: Whether the model from fastface should be loaded with it's pretrained weights.
      loss_fn: the function(s) to update the model with. Has no effect for fastface models.
      metrics: The provided metrics. All metrics here will be logged to progress bar and the respective logger.
          Changing this argument currently has no effect.
      optimizer: Optimizer to use for training.
      lr_scheduler: The LR scheduler to use during training.
      learning_rate: The learning rate to use for training.
      kwargs: additional kwargs nessesary for initializing face detector backbone
code: def get_model(
      model_name: str,
      pretrained: bool,
      **kwargs,
  ):
      model, pl_model = FACE_DETECTION_BACKBONES.get(model_name)(
          pretrained=pretrained, **kwargs
      )
  
      # following steps are required since `get_model` needs to return `torch.nn.Module`
      # moving some required parameters from `fastface.FaceDetector` to `torch.nn.Module`
      # set input_transform params
      model.register_buffer(
          "normalizer", getattr(pl_model, "normalizer")
      )
      model.register_buffer("mean", getattr(pl_model, "mean"))
      model.register_buffer("std", getattr(pl_model, "std"))
  
      # copy pasting `_postprocess` function from `fastface.FaceDetector` to `torch.nn.Module`
      # set output_transform function
      # this is called from FaceDetector lightning module form fastface itself
      # https://github.com/borhanMorphy/fastface/blob/master/fastface/module.py#L200
      setattr(model, "_postprocess", getattr(pl_model, "_postprocess"))
  
      return model
  
imports: from typing import Any, Iterable, List, Optional, Union
  from torch import Tensor
  from torch.nn import Module
  from flash.core.data.io.input import DataKeys
  from flash.core.model import Task
  from flash.core.utilities.imports import _FASTFACE_AVAILABLE
  from flash.core.utilities.stability import beta
  from flash.core.utilities.types import LOSS_FN_TYPE, LR_SCHEDULER_TYPE, METRICS_TYPE, OPTIMIZER_TYPE
  from flash.image.face_detection.backbones import FACE_DETECTION_BACKBONES
  from flash.image.face_detection.output_transform import FaceDetectionOutputTransform
label_desc: Use image node_id 2 for calling the FaceDetector obj's underlying member method code with example usage: obj.get_model(model_name, pretrained) and returns: model