class_docstr: Assign a corresponding gt bbox or background to each bbox.
  
  Each proposals will be assigned with an integer indicating the ground truth
   index. (semi-positive index: gt label (0-based), -1: background)
  
  - -1: negative sample, no assigned gt
  - semi-positive integer: positive sample, index (0-based) of assigned gt
  
  Args:
      pos_iou_thr (float): IoU threshold for positive bboxes.
      neg_iou_thr (float or tuple): IoU threshold for negative bboxes.
      min_pos_iou (float): Minimum iou for a bbox to be considered as a
          positive bbox. Positive samples can have smaller IoU than
          pos_iou_thr due to the 4th step (assign max IoU sample to each gt).
      gt_max_assign_all (bool): Whether to assign all bboxes with the same
          highest overlap with some gt to that gt.
      ignore_iof_thr (float): IoF threshold for ignoring bboxes (if
          `gt_bboxes_ignore` is specified). Negative values mean not
          ignoring any bboxes.
      ignore_wrt_candidates (bool): Whether to compute the iof between
          `bboxes` and `gt_bboxes_ignore`, or the contrary.
      match_low_quality (bool): Whether to allow quality matches. This is
          usually allowed for RPN and single stage detectors, but not allowed
          in the second stage.
      gpu_assign_thr (int): The upper bound of the number of GT for GPU
          assign. When the number of gt is above this threshold, will assign
          on CPU device. Negative values mean not assign on CPU.
code: def __init__(
      self,
      pos_iou_thr,
      neg_iou_thr,
      min_pos_iou=0.0,
      gt_max_assign_all=True,
      ignore_iof_thr=-1,
      ignore_wrt_candidates=True,
      match_low_quality=True,
      gpu_assign_thr=-1,
      iou_calculator=dict(type="BboxOverlaps2D"),
  ):
      self.pos_iou_thr = pos_iou_thr
      self.neg_iou_thr = neg_iou_thr
      self.min_pos_iou = min_pos_iou
      self.gt_max_assign_all = gt_max_assign_all
      self.ignore_iof_thr = ignore_iof_thr
      self.ignore_wrt_candidates = ignore_wrt_candidates
      self.gpu_assign_thr = gpu_assign_thr
      self.match_low_quality = match_low_quality
      self.iou_calculator = build_iou_calculator(iou_calculator)
  
file_path: insightface/detection/scrfd/mmdet/core/bbox/assigners/approx_max_iou_assigner.py
imports: import torch
  from ..builder import BBOX_ASSIGNERS
  from ..iou_calculators import build_iou_calculator
  from .max_iou_assigner import MaxIoUAssigner
label_desc: Use image node_id 1 to create a new ApproxMaxIoUAssigner object from inherited base classes: MaxIoUAssigner with example: obj = ApproxMaxIoUAssigner(pos_iou_thr, neg_iou_thr, min_pos_iou, gt_max_assign_all, ignore_iof_thr, ignore_wrt_candidates, match_low_quality, gpu_assign_thr, iou_calculator)