Zhang Zelun 10 月之前
父节点
当前提交
e914a7bd83
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      paddlex/inference/models_new/semantic_segmentation/result.py

+ 2 - 0
paddlex/inference/models_new/semantic_segmentation/result.py

@@ -26,6 +26,8 @@ class SegResult(BaseCVResult):
         """apply"""
         seg_map = self["pred"]
         pc_map = self.get_pseudo_color_map(seg_map[0])
+        if pc_map.mode == "P":
+            pc_map = pc_map.convert("RGB")
         return pc_map
 
     def get_pseudo_color_map(self, pred):