class_docstr: Simplest RoI head, with only two fc layers for classification and
  regression respectively.
class_docstr_tok: ["Simplest","RoI","head",",","with","only","two","fc","layers","for","classification","and","regression","respectively","."]
code: def get_targets(
      self,
      sampling_results,
      gt_bboxes,
      gt_labels,
      rcnn_train_cfg,
      concat=True,
  ):
      pos_bboxes_list = [res.pos_bboxes for res in sampling_results]
      neg_bboxes_list = [res.neg_bboxes for res in sampling_results]
      pos_gt_bboxes_list = [
          res.pos_gt_bboxes for res in sampling_results
      ]
      pos_gt_labels_list = [
          res.pos_gt_labels for res in sampling_results
      ]
      labels, label_weights, bbox_targets, bbox_weights = multi_apply(
          self._get_target_single,
          pos_bboxes_list,
          neg_bboxes_list,
          pos_gt_bboxes_list,
          pos_gt_labels_list,
          cfg=rcnn_train_cfg,
      )
  
      if concat:
          labels = torch.cat(labels, 0)
          label_weights = torch.cat(label_weights, 0)
          bbox_targets = torch.cat(bbox_targets, 0)
          bbox_weights = torch.cat(bbox_weights, 0)
      return labels, label_weights, bbox_targets, bbox_weights
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/bbox_heads/bbox_head.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.runner import auto_fp16, force_fp32
  from torch.nn.modules.utils import _pair
  from mmdet.core import build_bbox_coder, multi_apply, multiclass_nms
  from mmdet.models.builder import HEADS, build_loss
  from mmdet.models.losses import accuracy
label_desc: Use image node_id 5 for calling the BBoxHead obj's underlying member method code with example usage: obj.get_targets(sampling_results, gt_bboxes, gt_labels, rcnn_train_cfg, concat) and returns: labels,  label_weights,  bbox_targets,  bbox_weights