class_docstr: Computes one-to-one matching between predictions and ground truth for
  mask.
  
  This class computes an assignment between the targets and the predictions
  based on the costs. The costs are weighted sum of three components:
  classification 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_cost (obj:`mmcv.ConfigDict`|dict): Classification cost config.
      mask_cost (obj:`mmcv.ConfigDict`|dict): Mask cost config.
      dice_cost (obj:`mmcv.ConfigDict`|dict): Dice cost config.
class_docstr_tok: ["Computes","one-to-one","matching","between","predictions","and","ground","truth","for","mask",".","This","class","computes","an","assignment","between","the","targets","and","the","predictions","based","on","the","costs",".","The","costs","are","weighted","sum","of","three","components",":","classification","cost",",","regression","L1","cost","and","regression","iou","cost",".","The","targets","do","n'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_cost","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Classification","cost","config",".","mask_cost","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Mask","cost","config",".","dice_cost","(","obj",":","`","mmcv.ConfigDict","`","|dict",")",":","Dice","cost","config","."]
code: def __init__(
      self,
      cls_cost=dict(type="ClassificationCost", weight=1.0),
      dice_cost=dict(type="DiceCost", weight=1.0),
      mask_cost=dict(type="MaskFocalCost", weight=1.0),
  ):
      self.cls_cost = build_match_cost(cls_cost)
      self.dice_cost = build_match_cost(dice_cost)
      self.mask_cost = build_match_cost(mask_cost)
  
file_path: dinov2/dinov2/eval/segmentation_m2f/models/utils/assigner.py
imports: from abc import ABCMeta, abstractmethod
  import torch
  from ..builder import MASK_ASSIGNERS, build_match_cost
label_desc: Use image node_id 1 to create a new MaskHungarianAssigner object from inherited base classes: BaseAssigner with example: obj = MaskHungarianAssigner(cls_cost, dice_cost, mask_cost)