class_docstr: Cost of mask assignments based on dice losses.
  
  Args:
      pred_act (bool): Whether to apply sigmoid to mask_pred.
          Defaults to False.
      eps (float): Defaults to 1e-3.
      naive_dice (bool): If True, use the naive dice loss
          in which the power of the number in the denominator is
          the first power. If False, use the second power that
          is adopted by K-Net and SOLO. Defaults to True.
      weight (Union[float, int]): Cost weight. Defaults to 1.
class_docstr_tok: ["Cost","of","mask","assignments","based","on","dice","losses",".","Args",":","pred_act","(","bool",")",":","Whether","to","apply","sigmoid","to","mask_pred",".","Defaults","to","False",".","eps","(","float",")",":","Defaults","to","1e-3",".","naive_dice","(","bool",")",":","If","True",",","use","the","naive","dice","loss","in","which","the","power","of","the","number","in","the","denominator","is","the","first","power",".","If","False",",","use","the","second","power","that","is","adopted","by","K-Net","and","SOLO",".","Defaults","to","True",".","weight","(","Union","[","float",",","int","]",")",":","Cost","weight",".","Defaults","to","1","."]
docstr: Compute match cost.
  
  Args:
      pred_instances (:obj:`InstanceData`): Predicted instances which
          must contain ``masks``.
      gt_instances (:obj:`InstanceData`): Ground truth which must contain
          ``mask``.
      img_meta (Optional[dict]): Image information. Defaults to None.
  
  Returns:
      Tensor: Match Cost matrix of shape (num_preds, num_gts).
code: def __call__(
      self,
      pred_instances: InstanceData,
      gt_instances: InstanceData,
      img_meta: Optional[dict] = None,
      **kwargs,
  ) -> Tensor:
      """Compute match cost.
  
      Args:
          pred_instances (:obj:`InstanceData`): Predicted instances which
              must contain ``masks``.
          gt_instances (:obj:`InstanceData`): Ground truth which must contain
              ``mask``.
          img_meta (Optional[dict]): Image information. Defaults to None.
  
      Returns:
          Tensor: Match Cost matrix of shape (num_preds, num_gts).
      """
      pred_masks = pred_instances.masks
      gt_masks = gt_instances.masks
  
      if self.pred_act:
          pred_masks = pred_masks.sigmoid()
      dice_cost = self._binary_mask_dice_loss(pred_masks, gt_masks)
      return dice_cost * self.weight
  
imports: from abc import abstractmethod
  from typing import Optional, Union
  import torch
  import torch.nn.functional
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import bbox_overlaps, bbox_xyxy_to_cxcywh
label_desc: Use image node_id 3 for calling the DiceCost obj's underlying member method code with example usage: obj.__call__(pred_instances, gt_instances, img_meta) and returns: unknown