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

        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), ...]
        
contrib/PanopticSeg/paddlepanseg/utils/evaluation/ins_seg_evaluator.py