We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bf35fe commit ea26e30Copy full SHA for ea26e30
paddlex/inference/pipelines/layout_parsing/utils.py
@@ -813,8 +813,7 @@ def _img_array2path(data: np.ndarray) -> str:
813
if isinstance(data, np.ndarray) and data.ndim == 3:
814
# Generate a unique filename using UUID
815
img_name = f"image_{uuid.uuid4().hex}.png"
816
-
817
- return {f"imgs/{img_name}": Image.fromarray(data)}
+ return {f"imgs/{img_name}": Image.fromarray(data[:, :, ::-1])}
818
else:
819
raise ValueError(
820
"Input data must be a 3-dimensional numpy array representing an image."
0 commit comments