code: def loss(self, mask_pred, mask_targets, labels):
      loss = dict()
      if mask_pred.size(0) == 0:
          loss_mask = mask_pred.sum()
      else:
          if self.class_agnostic:
              loss_mask = self.loss_mask(
                  mask_pred, mask_targets, torch.zeros_like(labels)
              )
          else:
              loss_mask = self.loss_mask(
                  mask_pred, mask_targets, labels
              )
      loss["loss_mask"] = loss_mask
      return loss
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/mask_heads/fcn_mask_head.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import Conv2d, ConvModule, build_upsample_layer
  from mmcv.ops.carafe import CARAFEPack
  from mmcv.runner import auto_fp16, force_fp32
  from torch.nn.modules.utils import _pair
  from mmdet.core import mask_target
  from mmdet.models.builder import HEADS, build_loss
label_desc: Use image node_id 5 for calling the FCNMaskHead obj's underlying member method code with example usage: obj.loss(mask_pred, mask_targets, labels) and returns: loss