瀏覽代碼

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Xiaomeng Zhao 3 月之前
父節點
當前提交
324681f77c
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      mineru/model/table/rec/unet_table/wired_table_rec_utils.py

+ 11 - 0
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,
     ):