class_docstr: Mask IoU Head.
  
  This head predicts the IoU of predicted masks and corresponding gt masks.
code: def __init__(
      self,
      num_convs=4,
      num_fcs=2,
      roi_feat_size=14,
      in_channels=256,
      conv_out_channels=256,
      fc_out_channels=1024,
      num_classes=80,
      loss_iou=dict(type="MSELoss", loss_weight=0.5),
  ):
      super(MaskIoUHead, self).__init__()
      self.in_channels = in_channels
      self.conv_out_channels = conv_out_channels
      self.fc_out_channels = fc_out_channels
      self.num_classes = num_classes
      self.fp16_enabled = False
  
      self.convs = nn.ModuleList()
      for i in range(num_convs):
          if i == 0:
              # concatenation of mask feature and mask prediction
              in_channels = self.in_channels + 1
          else:
              in_channels = self.conv_out_channels
          stride = 2 if i == num_convs - 1 else 1
          self.convs.append(
              Conv2d(
                  in_channels,
                  self.conv_out_channels,
                  3,
                  stride=stride,
                  padding=1,
              )
          )
  
      roi_feat_size = _pair(roi_feat_size)
      pooled_area = (roi_feat_size[0] // 2) * (roi_feat_size[1] // 2)
      self.fcs = nn.ModuleList()
      for i in range(num_fcs):
          in_channels = (
              self.conv_out_channels * pooled_area
              if i == 0
              else self.fc_out_channels
          )
          self.fcs.append(Linear(in_channels, self.fc_out_channels))
  
      self.fc_mask_iou = Linear(self.fc_out_channels, self.num_classes)
      self.relu = nn.ReLU()
      self.max_pool = MaxPool2d(2, 2)
      self.loss_iou = build_loss(loss_iou)
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/mask_heads/maskiou_head.py
imports: import numpy
  import torch
  import torch.nn
  from mmcv.cnn import Conv2d, Linear, MaxPool2d, kaiming_init, normal_init
  from mmcv.runner import force_fp32
  from torch.nn.modules.utils import _pair
  from mmdet.models.builder import HEADS, build_loss
label_desc: Use image node_id 1 to create a new MaskIoUHead object from inherited base classes: nn with example: obj = MaskIoUHead(num_convs, num_fcs, roi_feat_size, in_channels, conv_out_channels, fc_out_channels, num_classes, loss_iou)