Zhang Zelun hace 10 meses
padre
commit
e914a7bd83
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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):