class_docstr: Computes one-to-one matching between predictions and ground truth.
  
  This class computes an assignment between the targets and the predictions
  based on the costs. The costs are weighted sum of three components:
  classfication cost, regression L1 cost and regression iou cost. The
  targets don't include the no_object, so generally there are more
  predictions than targets. After the one-to-one matching, the un-matched
  are treated as backgrounds. Thus each query prediction will be assigned
  with `0` or a positive integer indicating the ground truth index:
  
  - 0: negative sample, no assigned gt
  - positive integer: positive sample, index (1-based) of assigned gt
  
  Args:
      cls_weight (int | float, optional): The scale factor for classification
          cost. Default 1.0.
      bbox_weight (int | float, optional): The scale factor for regression
          L1 cost. Default 1.0.
      iou_weight (int | float, optional): The scale factor for regression
          iou cost. Default 1.0.
      iou_calculator (dict | optional): The config for the iou calculation.
          Default type `BboxOverlaps2D`.
      iou_mode (str | optional): "iou" (intersection over union), "iof"
              (intersection over foreground), or "giou" (generalized
              intersection over union). Default "giou".
code: def __init__(
      self,
      cls_weight=1.0,
      bbox_weight=1.0,
      iou_weight=1.0,
      iou_calculator=dict(type="BboxOverlaps2D"),
      iou_mode="giou",
  ):
      # defaultly giou cost is used in the official DETR repo.
      self.iou_mode = iou_mode
      self.cls_weight = cls_weight
      self.bbox_weight = bbox_weight
      self.iou_weight = iou_weight
      self.iou_calculator = build_iou_calculator(iou_calculator)
  
file_path: insightface/detection/scrfd/mmdet/core/bbox/assigners/hungarian_assigner.py
imports: import torch
  from scipy.optimize import linear_sum_assignment
  from ..builder import BBOX_ASSIGNERS
  from ..iou_calculators import build_iou_calculator
  from ..transforms import bbox_cxcywh_to_xyxy, bbox_xyxy_to_cxcywh
  from .assign_result import AssignResult
  from .base_assigner import BaseAssigner
label_desc: Use image node_id 1 to create a new HungarianAssigner object from inherited base classes: BaseAssigner with example: obj = HungarianAssigner(cls_weight, bbox_weight, iou_weight, iou_calculator, iou_mode)