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: Estimate uncertainty based on pred logits.
  
  We estimate uncertainty as L1 distance between 0.0 and the logits
  prediction in 'mask_pred' for the foreground class in `classes`.
  
  Args:
      mask_pred (Tensor): mask predication logits, shape (num_rois,
          num_classes, mask_height, mask_width).
  
      labels (list[Tensor]): Either predicted or ground truth label for
          each predicted mask, of length num_rois.
  
  Returns:
      scores (Tensor): Uncertainty scores with the most uncertain
          locations having the highest uncertainty score,
          shape (num_rois, 1, mask_height, mask_width)
docstr_tok: ["Estimate","uncertainty","based","on","pred","logits",".","We","estimate","uncertainty","as","L1","distance","between","0.0","and","the","logits","prediction","in","'mask_pred","'","for","the","foreground","class","in","`","classes","`",".","Args",":","mask_pred","(","Tensor",")",":","mask","predication","logits",",","shape","(","num_rois",",","num_classes",",","mask_height",",","mask_width",")",".","labels","(","list","[","Tensor","]",")",":","Either","predicted","or","ground","truth","label","for","each","predicted","mask",",","of","length","num_rois",".","Returns",":","scores","(","Tensor",")",":","Uncertainty","scores","with","the","most","uncertain","locations","having","the","highest","uncertainty","score",",","shape","(","num_rois",",","1",",","mask_height",",","mask_width",")"]
code: def _get_uncertainty(self, mask_pred, labels):
      """Estimate uncertainty based on pred logits.
  
      We estimate uncertainty as L1 distance between 0.0 and the logits
      prediction in 'mask_pred' for the foreground class in `classes`.
  
      Args:
          mask_pred (Tensor): mask predication logits, shape (num_rois,
              num_classes, mask_height, mask_width).
  
          labels (list[Tensor]): Either predicted or ground truth label for
              each predicted mask, of length num_rois.
  
      Returns:
          scores (Tensor): Uncertainty scores with the most uncertain
              locations having the highest uncertainty score,
              shape (num_rois, 1, mask_height, mask_width)
      """
      if mask_pred.shape[1] == 1:
          gt_class_logits = mask_pred.clone()
      else:
          inds = torch.arange(
              mask_pred.shape[0], device=mask_pred.device
          )
          gt_class_logits = mask_pred[inds, labels].unsqueeze(1)
      return -torch.abs(gt_class_logits)
  
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 7 for calling the MaskPointHead obj's underlying member method code with example usage: obj._get_uncertainty(mask_pred, labels) and returns: unknown