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. Default: 3.
      in_channels (int): Number of input channels. Default: 256.
      fc_channels (int): Number of fc channels. Default: 256.
      num_classes (int): Number of classes for logits. Default: 80.
      class_agnostic (bool): Whether use class agnostic classification.
          If so, the output channels of logits will be 1. Default: False.
      coarse_pred_each_layer (bool): Whether concatenate coarse feature with
          the output of each fc layer. Default: True.
      conv_cfg (dict | None): Dictionary to construct and config conv layer.
          Default: dict(type='Conv1d'))
      norm_cfg (dict | None): Dictionary to construct and config norm layer.
          Default: None.
      loss_point (dict): Dictionary to construct and config loss layer of
          point head. Default: dict(type='CrossEntropyLoss', use_mask=True,
          loss_weight=1.0).
docstr: Get ``num_points`` most uncertain points during test.
  
  Args:
      mask_pred (Tensor): A tensor of shape (num_rois, num_classes,
          mask_height, mask_width) for class-specific or class-agnostic
          prediction.
      pred_label (list): The predication class for each instance.
      cfg (dict): Testing config of point head.
  
  Returns:
      point_indices (Tensor): A tensor of shape (num_rois, num_points)
          that contains indices from [0, mask_height x mask_width) of the
          most uncertain points.
      point_coords (Tensor): A tensor of shape (num_rois, num_points, 2)
          that contains [0, 1] x [0, 1] normalized coordinates of the
          most uncertain points from the [mask_height, mask_width] grid .
docstr_tok: ["Get","``","num_points","``","most","uncertain","points","during","test",".","Args",":","mask_pred","(","Tensor",")",":","A","tensor","of","shape","(","num_rois",",","num_classes",",","mask_height",",","mask_width",")","for","class-specific","or","class-agnostic","prediction",".","pred_label","(","list",")",":","The","predication","class","for","each","instance",".","cfg","(","dict",")",":","Testing","config","of","point","head",".","Returns",":","point_indices","(","Tensor",")",":","A","tensor","of","shape","(","num_rois",",","num_points",")","that","contains","indices","from","[","0",",","mask_height","x","mask_width",")","of","the","most","uncertain","points",".","point_coords","(","Tensor",")",":","A","tensor","of","shape","(","num_rois",",","num_points",",","2",")","that","contains","[","0",",","1","]","x","[","0",",","1","]","normalized","coordinates","of","the","most","uncertain","points","from","the","[","mask_height",",","mask_width","]","grid","."]
code: def get_roi_rel_points_test(self, mask_pred, pred_label, cfg):
      """Get ``num_points`` most uncertain points during test.
  
      Args:
          mask_pred (Tensor): A tensor of shape (num_rois, num_classes,
              mask_height, mask_width) for class-specific or class-agnostic
              prediction.
          pred_label (list): The predication class for each instance.
          cfg (dict): Testing config of point head.
  
      Returns:
          point_indices (Tensor): A tensor of shape (num_rois, num_points)
              that contains indices from [0, mask_height x mask_width) of the
              most uncertain points.
          point_coords (Tensor): A tensor of shape (num_rois, num_points, 2)
              that contains [0, 1] x [0, 1] normalized coordinates of the
              most uncertain points from the [mask_height, mask_width] grid .
      """
      num_points = cfg.subdivision_num_points
      uncertainty_map = self._get_uncertainty(mask_pred, pred_label)
      num_rois, _, mask_height, mask_width = uncertainty_map.shape
      h_step = 1.0 / mask_height
      w_step = 1.0 / mask_width
  
      uncertainty_map = uncertainty_map.view(
          num_rois, mask_height * mask_width
      )
      num_points = min(mask_height * mask_width, num_points)
      point_indices = uncertainty_map.topk(num_points, dim=1)[1]
      point_coords = uncertainty_map.new_zeros(num_rois, num_points, 2)
      point_coords[:, :, 0] = (
          w_step / 2.0 + (point_indices % mask_width).float() * w_step
      )
      point_coords[:, :, 1] = (
          h_step / 2.0 + (point_indices // mask_width).float() * h_step
      )
      return point_indices, point_coords
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/mask_heads/mask_point_head.py
imports: import torch
  import torch.nn
  from mmcv.cnn import ConvModule, normal_init
  from mmcv.ops import point_sample, rel_roi_point_to_rel_img_point
  from mmdet.models.builder import HEADS, build_loss
label_desc: Use image node_id 9 for calling the MaskPointHead obj's underlying member method code with example usage: obj.get_roi_rel_points_test(mask_pred, pred_label, cfg) and returns: point_indices,  point_coords