class_docstr: Detection Head of RTMDet-Ins.
  
  Args:
      num_prototypes (int): Number of mask prototype features extracted
          from the mask head. Defaults to 8.
      dyconv_channels (int): Channel of the dynamic conv layers.
          Defaults to 8.
      num_dyconvs (int): Number of the dynamic convolution layers.
          Defaults to 3.
      mask_loss_stride (int): Down sample stride of the masks for loss
          computation. Defaults to 4.
      loss_mask (:obj:`ConfigDict` or dict): Config dict for mask loss.
code: def __init__(
      self,
      *args,
      num_prototypes: int = 8,
      dyconv_channels: int = 8,
      num_dyconvs: int = 3,
      mask_loss_stride: int = 4,
      loss_mask=dict(
          type="DiceLoss", loss_weight=2.0, eps=5e-6, reduction="mean"
      ),
      **kwargs,
  ) -> None:
      self.num_prototypes = num_prototypes
      self.num_dyconvs = num_dyconvs
      self.dyconv_channels = dyconv_channels
      self.mask_loss_stride = mask_loss_stride
      super().__init__(*args, **kwargs)
      self.loss_mask = MODELS.build(loss_mask)
  
imports: import copy
  import math
  from typing import List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule, is_norm
  from mmcv.ops import batched_nms
  from mmengine.model import BaseModule, bias_init_with_prob, constant_init, normal_init
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models.layers.transformer import inverse_sigmoid
  from mmdet.models.utils import filter_scores_and_topk, multi_apply, select_single_mlvl, sigmoid_geometric_mean
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import cat_boxes, distance2bbox, get_box_tensor, get_box_wh, scale_boxes
  from mmdet.utils import ConfigType, InstanceList, OptInstanceList, reduce_mean
  from .rtmdet_head import RTMDetHead
label_desc: Use image node_id 1 to create a new RTMDetInsHead object from inherited base classes: RTMDetHead with example: obj = RTMDetInsHead()