瀏覽代碼

fix channel order of layout result

gaotingquan 8 月之前
父節點
當前提交
04493cef27
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      paddlex/inference/pipelines/layout_parsing/result_v2.py

+ 1 - 1
paddlex/inference/pipelines/layout_parsing/result_v2.py

@@ -90,7 +90,7 @@ class LayoutParsingResultV2(BaseCVResult, HtmlMixin, XlsxMixin, MarkdownMixin):
                 res_img_dict[key] = sub_seal_res_dict["ocr_res_img"]
 
         # for layout ordering image
-        image = Image.fromarray(self["doc_preprocessor_res"]["output_img"])
+        image = Image.fromarray(self["doc_preprocessor_res"]["output_img"][:, :, ::-1])
         draw = ImageDraw.Draw(image, "RGBA")
         parsing_result = self["parsing_res_list"]
         for block in parsing_result: