class_docstr: Head of CentripetalNet: Pursuing High-quality Keypoint Pairs for Object
  Detection.
  
  CentripetalHead inherits from :class:`CornerHead`. It removes the
  embedding branch and adds guiding shift and centripetal shift branches.
  More details can be found in the `paper
  <https://arxiv.org/abs/2003.09119>`_ .
  
  Args:
      num_classes (int): Number of categories excluding the background
          category.
      in_channels (int): Number of channels in the input feature map.
      num_feat_levels (int): Levels of feature from the previous module. 2
          for HourglassNet-104 and 1 for HourglassNet-52. HourglassNet-104
          outputs the final feature and intermediate supervision feature and
          HourglassNet-52 only outputs the final feature. Default: 2.
      corner_emb_channels (int): Channel of embedding vector. Default: 1.
      train_cfg (dict | None): Training config. Useless in CornerHead,
          but we keep this variable for SingleStageDetector. Default: None.
      test_cfg (dict | None): Testing config of CornerHead. Default: None.
      loss_heatmap (dict | None): Config of corner heatmap loss. Default:
          GaussianFocalLoss.
      loss_embedding (dict | None): Config of corner embedding loss. Default:
          AssociativeEmbeddingLoss.
      loss_offset (dict | None): Config of corner offset loss. Default:
          SmoothL1Loss.
      loss_guiding_shift (dict): Config of guiding shift loss. Default:
          SmoothL1Loss.
      loss_centripetal_shift (dict): Config of centripetal shift loss.
          Default: SmoothL1Loss.
code: def __init__(
      self,
      *args,
      centripetal_shift_channels=2,
      guiding_shift_channels=2,
      feat_adaption_conv_kernel=3,
      loss_guiding_shift=dict(
          type="SmoothL1Loss", beta=1.0, loss_weight=0.05
      ),
      loss_centripetal_shift=dict(
          type="SmoothL1Loss", beta=1.0, loss_weight=1
      ),
      **kwargs,
  ):
      assert (
          centripetal_shift_channels == 2
      ), "CentripetalHead only support centripetal_shift_channels == 2"
      self.centripetal_shift_channels = centripetal_shift_channels
      assert (
          guiding_shift_channels == 2
      ), "CentripetalHead only support guiding_shift_channels == 2"
      self.guiding_shift_channels = guiding_shift_channels
      self.feat_adaption_conv_kernel = feat_adaption_conv_kernel
      super(CentripetalHead, self).__init__(*args, **kwargs)
      self.loss_guiding_shift = build_loss(loss_guiding_shift)
      self.loss_centripetal_shift = build_loss(loss_centripetal_shift)
  
file_path: insightface/detection/scrfd/mmdet/models/dense_heads/centripetal_head.py
imports: import torch.nn
  from mmcv.cnn import ConvModule, normal_init
  from mmcv.ops import DeformConv2d
  from mmdet.core import multi_apply
  from ..builder import HEADS, build_loss
  from .corner_head import CornerHead
label_desc: Use image node_id 1 to create a new CentripetalHead object from inherited base classes: CornerHead with example: obj = CentripetalHead()