Skip to content

Commit ea26e30

Browse files
committed
fix img channel in saving markdown
1 parent 8bf35fe commit ea26e30

File tree

1 file changed

+1
-2
lines changed
  • paddlex/inference/pipelines/layout_parsing

1 file changed

+1
-2
lines changed

paddlex/inference/pipelines/layout_parsing/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,8 +813,7 @@ def _img_array2path(data: np.ndarray) -> str:
813813
if isinstance(data, np.ndarray) and data.ndim == 3:
814814
# Generate a unique filename using UUID
815815
img_name = f"image_{uuid.uuid4().hex}.png"
816-
817-
return {f"imgs/{img_name}": Image.fromarray(data)}
816+
return {f"imgs/{img_name}": Image.fromarray(data[:, :, ::-1])}
818817
else:
819818
raise ValueError(
820819
"Input data must be a 3-dimensional numpy array representing an image."

0 commit comments

Comments
 (0)