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.
docstr: Forward feature of a single level.
  
  Args:
      x (Tensor): Feature of a single level.
      lvl_ind (int): Level index of current feature.
  
  Returns:
      tuple[Tensor]: A tuple of CentripetalHead's output for current
      feature level. Containing the following Tensors:
  
          - tl_heat (Tensor): Predicted top-left corner heatmap.
          - br_heat (Tensor): Predicted bottom-right corner heatmap.
          - tl_off (Tensor): Predicted top-left offset heatmap.
          - br_off (Tensor): Predicted bottom-right offset heatmap.
          - tl_guiding_shift (Tensor): Predicted top-left guiding shift
            heatmap.
          - br_guiding_shift (Tensor): Predicted bottom-right guiding
            shift heatmap.
          - tl_centripetal_shift (Tensor): Predicted top-left centripetal
            shift heatmap.
          - br_centripetal_shift (Tensor): Predicted bottom-right
            centripetal shift heatmap.
docstr_tok: ["Forward","feature","of","a","single","level",".","Args",":","x","(","Tensor",")",":","Feature","of","a","single","level",".","lvl_ind","(","int",")",":","Level","index","of","current","feature",".","Returns",":","tuple","[","Tensor","]",":","A","tuple","of","CentripetalHead","'s","output","for","current","feature","level",".","Containing","the","following","Tensors",":","-","tl_heat","(","Tensor",")",":","Predicted","top-left","corner","heatmap",".","-","br_heat","(","Tensor",")",":","Predicted","bottom-right","corner","heatmap",".","-","tl_off","(","Tensor",")",":","Predicted","top-left","offset","heatmap",".","-","br_off","(","Tensor",")",":","Predicted","bottom-right","offset","heatmap",".","-","tl_guiding_shift","(","Tensor",")",":","Predicted","top-left","guiding","shift","heatmap",".","-","br_guiding_shift","(","Tensor",")",":","Predicted","bottom-right","guiding","shift","heatmap",".","-","tl_centripetal_shift","(","Tensor",")",":","Predicted","top-left","centripetal","shift","heatmap",".","-","br_centripetal_shift","(","Tensor",")",":","Predicted","bottom-right","centripetal","shift","heatmap","."]
code: def forward_single(self, x, lvl_ind):
      """Forward feature of a single level.
  
      Args:
          x (Tensor): Feature of a single level.
          lvl_ind (int): Level index of current feature.
  
      Returns:
          tuple[Tensor]: A tuple of CentripetalHead's output for current
          feature level. Containing the following Tensors:
  
              - tl_heat (Tensor): Predicted top-left corner heatmap.
              - br_heat (Tensor): Predicted bottom-right corner heatmap.
              - tl_off (Tensor): Predicted top-left offset heatmap.
              - br_off (Tensor): Predicted bottom-right offset heatmap.
              - tl_guiding_shift (Tensor): Predicted top-left guiding shift
                heatmap.
              - br_guiding_shift (Tensor): Predicted bottom-right guiding
                shift heatmap.
              - tl_centripetal_shift (Tensor): Predicted top-left centripetal
                shift heatmap.
              - br_centripetal_shift (Tensor): Predicted bottom-right
                centripetal shift heatmap.
      """
      (
          tl_heat,
          br_heat,
          _,
          _,
          tl_off,
          br_off,
          tl_pool,
          br_pool,
      ) = super().forward_single(x, lvl_ind, return_pool=True)
  
      tl_guiding_shift = self.tl_guiding_shift[lvl_ind](tl_pool)
      br_guiding_shift = self.br_guiding_shift[lvl_ind](br_pool)
  
      tl_dcn_offset = self.tl_dcn_offset[lvl_ind](
          tl_guiding_shift.detach()
      )
      br_dcn_offset = self.br_dcn_offset[lvl_ind](
          br_guiding_shift.detach()
      )
  
      tl_feat_adaption = self.tl_feat_adaption[lvl_ind](
          tl_pool, tl_dcn_offset
      )
      br_feat_adaption = self.br_feat_adaption[lvl_ind](
          br_pool, br_dcn_offset
      )
  
      tl_centripetal_shift = self.tl_centripetal_shift[lvl_ind](
          tl_feat_adaption
      )
      br_centripetal_shift = self.br_centripetal_shift[lvl_ind](
          br_feat_adaption
      )
  
      result_list = [
          tl_heat,
          br_heat,
          tl_off,
          br_off,
          tl_guiding_shift,
          br_guiding_shift,
          tl_centripetal_shift,
          br_centripetal_shift,
      ]
      return result_list
  
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 5 for calling the CentripetalHead obj's underlying member method code with example usage: obj.forward_single(x, lvl_ind) and returns: result_list