code: def __init__(
      self,
      num_classes=80,
      matcher="HungarianMatcher",
      loss_coeff={
          "class": 4,
          "bbox": 5,
          "giou": 2,
          "mask": 5,
          "dice": 5,
      },
      aux_loss=True,
      use_focal_loss=False,
      num_sample_points=12544,
      oversample_ratio=3.0,
      important_sample_ratio=0.75,
  ):
      super(MaskDINOLoss, self).__init__(
          num_classes, matcher, loss_coeff, aux_loss, use_focal_loss
      )
      assert oversample_ratio >= 1
      assert important_sample_ratio <= 1 and important_sample_ratio >= 0
  
      self.num_sample_points = num_sample_points
      self.oversample_ratio = oversample_ratio
      self.important_sample_ratio = important_sample_ratio
      self.num_oversample_points = int(
          num_sample_points * oversample_ratio
      )
      self.num_important_points = int(
          num_sample_points * important_sample_ratio
      )
      self.num_random_points = (
          num_sample_points - self.num_important_points
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from .iou_loss import GIoULoss
  from ..transformers import bbox_cxcywh_to_xyxy, sigmoid_focal_loss, varifocal_loss_with_logits
  from ..bbox_utils import bbox_iou
label_desc: Use image node_id 1 to create a new MaskDINOLoss object from inherited base classes: DETRLoss with example: obj = MaskDINOLoss(num_classes, matcher, loss_coeff, aux_loss, use_focal_loss, num_sample_points, oversample_ratio, important_sample_ratio)