code: def __init__(
      self,
      num_classes=80,
      focal_loss_alpha=0.25,
      focal_loss_gamma=2.0,
      class_weight=2.0,
      l1_weight=5.0,
      giou_weight=2.0,
      mask_weight=8.0,
  ):
      super(QueryInstLoss, self).__init__()
  
      self.num_classes = num_classes
      self.focal_loss_alpha = focal_loss_alpha
      self.focal_loss_gamma = focal_loss_gamma
      self.loss_weights = {
          "loss_cls": class_weight,
          "loss_bbox": l1_weight,
          "loss_giou": giou_weight,
          "loss_mask": mask_weight,
      }
      self.giou_loss = GIoULoss(eps=1e-6, reduction="sum")
  
      self.matcher = HungarianMatcher(
          focal_loss_alpha,
          focal_loss_gamma,
          class_weight,
          l1_weight,
          giou_weight,
      )
  
file_path: PaddleDetection/ppdet/modeling/losses/queryinst_loss.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from ppdet.modeling.losses.iou_loss import GIoULoss
  from .sparsercnn_loss import HungarianMatcher
label_desc: Use image node_id 1 to create a new QueryInstLoss object from inherited base classes: object with example: obj = QueryInstLoss(num_classes, focal_loss_alpha, focal_loss_gamma, class_weight, l1_weight, giou_weight, mask_weight)