Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

Update mineru/model/table/rec/unet_table/wired_table_rec_utils.py

Xiaomeng Zhao324681f77ca9
diff --git a/mineru/model/table/rec/unet_table/wired_table_rec_utils.py b/mineru/model/table/rec/unet_table/wired_table_rec_utils.py
index ced61520..56ed02d9 100644
--- a/mineru/model/table/rec/unet_table/wired_table_rec_utils.py
+++ b/mineru/model/table/rec/unet_table/wired_table_rec_utils.py
@@ -109,6 +109,17 @@ class ONNXRuntimeError(Exception):
class LoadImage:
+ """
+ Utility class for loading and converting images from various input types to a numpy ndarray.
+
+ Supported input types:
+ - str or pathlib.Path: Path to an image file.
+ - bytes: Image data in bytes format.
+ - numpy.ndarray: Already loaded image array.
+
+ The class attempts to load the image and convert it to a numpy ndarray in BGR format.
+ Raises LoadImageError for unsupported types or if the image cannot be loaded.
+ """
def __init__(
self,
):