class_docstr: Mask feature head used in RTMDet-Ins.
  
  Args:
      in_channels (int): Number of channels in the input feature map.
      feat_channels (int): Number of hidden channels of the mask feature
           map branch.
      num_levels (int): The starting feature map level from RPN that
           will be used to predict the mask feature map.
      num_prototypes (int): Number of output channel of the mask feature
           map branch. This is the channel count of the mask
           feature map that to be dynamically convolved with the predicted
           kernel.
      stacked_convs (int): Number of convs in mask feature branch.
      act_cfg (:obj:`ConfigDict` or dict): Config dict for activation layer.
          Default: dict(type='ReLU', inplace=True)
      norm_cfg (dict): Config dict for normalization layer. Default: None.
code: def __init__(
      self,
      in_channels: int,
      feat_channels: int = 256,
      stacked_convs: int = 4,
      num_levels: int = 3,
      num_prototypes: int = 8,
      act_cfg: ConfigType = dict(type="ReLU", inplace=True),
      norm_cfg: ConfigType = dict(type="BN"),
  ) -> None:
      super().__init__(init_cfg=None)
      self.num_levels = num_levels
      self.fusion_conv = nn.Conv2d(
          num_levels * in_channels, in_channels, 1
      )
      convs = []
      for i in range(stacked_convs):
          in_c = in_channels if i == 0 else feat_channels
          convs.append(
              ConvModule(
                  in_c,
                  feat_channels,
                  3,
                  padding=1,
                  act_cfg=act_cfg,
                  norm_cfg=norm_cfg,
              )
          )
      self.stacked_convs = nn.Sequential(*convs)
      self.projection = nn.Conv2d(
          feat_channels, num_prototypes, kernel_size=1
      )
  
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 MaskFeatModule object from inherited base classes: BaseModule with example: obj = MaskFeatModule(in_channels, feat_channels, stacked_convs, num_levels, num_prototypes, act_cfg, norm_cfg)