class_docstr: CondInst box head used in https://arxiv.org/abs/1904.02689.
  
  Note that CondInst Bbox Head is a extension of FCOS head.
  Two differences are described as follows:
  
  1. CondInst box head predicts a set of params for each instance.
  2. CondInst box head return the pos_gt_inds and pos_inds.
  
  Args:
      num_params (int): Number of params for instance segmentation.
class_docstr_tok: ["CondInst","box","head","used","in","https",":","\/\/arxiv.org\/abs\/1904.02689",".","Note","that","CondInst","Bbox","Head","is","a","extension","of","FCOS","head",".","Two","differences","are","described","as","follows",":","1",".","CondInst","box","head","predicts","a","set","of","params","for","each","instance",".","2",".","CondInst","box","head","return","the","pos_gt_inds","and","pos_inds",".","Args",":","num_params","(","int",")",":","Number","of","params","for","instance","segmentation","."]
docstr: Get positive information from sampling results.
  
  Returns:
      list[:obj:`InstanceData`]: Positive information of each image,
      usually including positive bboxes, positive labels, positive
      priors, etc.
docstr_tok: ["Get","positive","information","from","sampling","results",".","Returns",":","list","[",":","obj",":","`","InstanceData","`","]",":","Positive","information","of","each","image",",","usually","including","positive","bboxes",",","positive","labels",",","positive","priors",",","etc","."]
code: def get_positive_infos(self) -> InstanceList:
      """Get positive information from sampling results.
  
      Returns:
          list[:obj:`InstanceData`]: Positive information of each image,
          usually including positive bboxes, positive labels, positive
          priors, etc.
      """
      assert len(self._raw_positive_infos) > 0
  
      pos_gt_inds_list = self._raw_positive_infos["pos_gt_inds_list"]
      pos_inds_list = self._raw_positive_infos["pos_inds_list"]
      num_imgs = len(pos_gt_inds_list)
  
      cls_score_list = []
      centerness_list = []
      param_pred_list = []
      point_list = []
      stride_list = []
      for (
          cls_score_per_lvl,
          centerness_per_lvl,
          param_pred_per_lvl,
          point_per_lvl,
          stride_per_lvl,
      ) in zip(
          self._raw_positive_infos["cls_scores"],
          self._raw_positive_infos["centernesses"],
          self._raw_positive_infos["param_preds"],
          self._raw_positive_infos["all_level_points"],
          self._raw_positive_infos["all_level_strides"],
      ):
          cls_score_per_lvl = cls_score_per_lvl.permute(
              0, 2, 3, 1
          ).reshape(num_imgs, -1, self.num_classes)
          centerness_per_lvl = centerness_per_lvl.permute(
              0, 2, 3, 1
          ).reshape(num_imgs, -1, 1)
          param_pred_per_lvl = param_pred_per_lvl.permute(
              0, 2, 3, 1
          ).reshape(num_imgs, -1, self.num_params)
          point_per_lvl = point_per_lvl.unsqueeze(0).repeat(
              num_imgs, 1, 1
          )
          stride_per_lvl = stride_per_lvl.unsqueeze(0).repeat(
              num_imgs, 1
          )
  
          cls_score_list.append(cls_score_per_lvl)
          centerness_list.append(centerness_per_lvl)
          param_pred_list.append(param_pred_per_lvl)
          point_list.append(point_per_lvl)
          stride_list.append(stride_per_lvl)
      cls_scores = torch.cat(cls_score_list, dim=1)
      centernesses = torch.cat(centerness_list, dim=1)
      param_preds = torch.cat(param_pred_list, dim=1)
      all_points = torch.cat(point_list, dim=1)
      all_strides = torch.cat(stride_list, dim=1)
  
      positive_infos = []
      for i, (pos_gt_inds, pos_inds) in enumerate(
          zip(pos_gt_inds_list, pos_inds_list)
      ):
          pos_info = InstanceData()
          pos_info.points = all_points[i][pos_inds]
          pos_info.strides = all_strides[i][pos_inds]
          pos_info.scores = cls_scores[i][pos_inds]
          pos_info.centernesses = centernesses[i][pos_inds]
          pos_info.param_preds = param_preds[i][pos_inds]
          pos_info.pos_assigned_gt_inds = pos_gt_inds
          pos_info.pos_inds = pos_inds
          positive_infos.append(pos_info)
      return positive_infos
  
imports: import copy
  from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule, Scale
  from mmengine.config import ConfigDict
  from mmengine.model import BaseModule, kaiming_init
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import cat_boxes
  from mmdet.utils import ConfigType, InstanceList, MultiConfig, OptConfigType, OptInstanceList, reduce_mean
  from ..task_modules.prior_generators import MlvlPointGenerator
  from ..utils import aligned_bilinear, filter_scores_and_topk, multi_apply, relative_coordinate_maps, select_single_mlvl
  from ..utils.misc import empty_instances
  from .base_mask_head import BaseMaskHead
  from .fcos_head import FCOSHead
label_desc: Use image node_id 7 for calling the CondInstBboxHead obj's underlying member method code with example usage: obj.get_positive_infos() and returns: positive_infos