class_docstr: A mask point head use in PointRend.
  
  ``MaskPointHead`` use shared multi-layer perceptron (equivalent to
  nn.Conv1d) to predict the logit of input points. The fine-grained feature
  and coarse feature will be concatenate together for predication.
  
  Args:
      num_fcs (int): Number of fc layers in the head. Defaults to 3.
      in_channels (int): Number of input channels. Defaults to 256.
      fc_channels (int): Number of fc channels. Defaults to 256.
      num_classes (int): Number of classes for logits. Defaults to 80.
      class_agnostic (bool): Whether use class agnostic classification.
          If so, the output channels of logits will be 1. Defaults to False.
      coarse_pred_each_layer (bool): Whether concatenate coarse feature with
          the output of each fc layer. Defaults to True.
      conv_cfg (:obj:`ConfigDict` or dict): Dictionary to construct
          and config conv layer. Defaults to dict(type='Conv1d')).
      norm_cfg (:obj:`ConfigDict` or dict, optional): Dictionary to construct
          and config norm layer. Defaults to None.
      loss_point (:obj:`ConfigDict` or dict): Dictionary to construct and
          config loss layer of point head. Defaults to
          dict(type='CrossEntropyLoss', use_mask=True, loss_weight=1.0).
      init_cfg (:obj:`ConfigDict` or dict or list[:obj:`ConfigDict` or             dict], optional): Initialization config dict.
code: def __init__(
      self,
      num_classes: int,
      num_fcs: int = 3,
      in_channels: int = 256,
      fc_channels: int = 256,
      class_agnostic: bool = False,
      coarse_pred_each_layer: bool = True,
      conv_cfg: ConfigType = dict(type="Conv1d"),
      norm_cfg: OptConfigType = None,
      act_cfg: ConfigType = dict(type="ReLU"),
      loss_point: ConfigType = dict(
          type="CrossEntropyLoss", use_mask=True, loss_weight=1.0
      ),
      init_cfg: MultiConfig = dict(
          type="Normal", std=0.001, override=dict(name="fc_logits")
      ),
  ) -> None:
      super().__init__(init_cfg=init_cfg)
      self.num_fcs = num_fcs
      self.in_channels = in_channels
      self.fc_channels = fc_channels
      self.num_classes = num_classes
      self.class_agnostic = class_agnostic
      self.coarse_pred_each_layer = coarse_pred_each_layer
      self.conv_cfg = conv_cfg
      self.norm_cfg = norm_cfg
      self.loss_point = MODELS.build(loss_point)
  
      fc_in_channels = in_channels + num_classes
      self.fcs = nn.ModuleList()
      for _ in range(num_fcs):
          fc = ConvModule(
              fc_in_channels,
              fc_channels,
              kernel_size=1,
              stride=1,
              padding=0,
              conv_cfg=conv_cfg,
              norm_cfg=norm_cfg,
              act_cfg=act_cfg,
          )
          self.fcs.append(fc)
          fc_in_channels = fc_channels
          fc_in_channels += (
              num_classes if self.coarse_pred_each_layer else 0
          )
  
      out_channels = 1 if self.class_agnostic else self.num_classes
      self.fc_logits = nn.Conv1d(
          fc_in_channels,
          out_channels,
          kernel_size=1,
          stride=1,
          padding=0,
      )
  
imports: from typing import List, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule
  from mmcv.ops import point_sample, rel_roi_point_to_rel_img_point
  from mmengine.model import BaseModule
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models.task_modules.samplers import SamplingResult
  from mmdet.models.utils import get_uncertain_point_coords_with_randomness, get_uncertainty
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import bbox2roi
  from mmdet.utils import ConfigType, InstanceList, MultiConfig, OptConfigType
label_desc: Use image node_id 1 to create a new MaskPointHead object from inherited base classes: BaseModule with example: obj = MaskPointHead(num_classes, num_fcs, in_channels, fc_channels, class_agnostic, coarse_pred_each_layer, conv_cfg, norm_cfg, act_cfg, loss_point, init_cfg)