docstr: Convert the predictions with format (h*w) to the format that can be used in AP calculation.
  
  Args:
      seg_pred (np.ndarray): The sementic segmentation map with shape C * H * W. Value is probability.
      pan_pred (np.ndarray): Panoptic predictions with encoded pan_ids.
      
  Returns:
      list: tuple list like: [(label, score, mask), ...]
docstr_tok: ["Convert","the","predictions","with","format","(","h","*","w",")","to","the","format","that","can","be","used","in","AP","calculation",".","Args",":","seg_pred","(","np.ndarray",")",":","The","sementic","segmentation","map","with","shape","C","*","H","*","W.","Value","is","probability",".","pan_pred","(","np.ndarray",")",":","Panoptic","predictions","with","encoded","pan_ids",".","Returns",":","list",":","tuple","list","like",":","[","(","label",",","score",",","mask",")",",","...","]"]
code: def convert_pred_map(self, seg_pred, pan_pred):
      """
      Convert the predictions with format (h*w) to the format that can be used in AP calculation.
  
      Args:
          seg_pred (np.ndarray): The sementic segmentation map with shape C * H * W. Value is probability.
          pan_pred (np.ndarray): Panoptic predictions with encoded pan_ids.
  
      Returns:
          list: tuple list like: [(label, score, mask), ...]
      """
      preds = []
      instance_cnt = np.unique(pan_pred)
      for i in instance_cnt:
          label, _ = decode_pan_id(i, self.label_divisor)
          # Stuff or crowded thing
          if (label not in self.thing_ids) or is_crowd(
              i, self.label_divisor
          ):
              continue
          mask = pan_pred == i
          score = np.mean(seg_pred[label][mask])
          preds.append((label, score, mask.astype("int64")))
      return preds
  
file_path: PaddleSeg/contrib/PanopticSeg/paddlepanseg/utils/evaluation/ins_seg_evaluator.py
imports: from collections import defaultdict
  import numpy
  from paddlepanseg.cvlibs import build_info_dict
  from paddlepanseg.utils import decode_pan_id, is_crowd
  from .evaluator import Evaluator
label_desc: Use image node_id 8 for calling the InsSegEvaluator obj's underlying member method code with example usage: obj.convert_pred_map(seg_pred, pan_pred) and returns: preds