Skip to content

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

Avoid cropping empty images.

jinghuan-Chen8bb8b715c197
diff --git a/mineru/model/table/rec/unet_table/main.py b/mineru/model/table/rec/unet_table/main.py
index 7fd64b58..03166ac1 100644
--- a/mineru/model/table/rec/unet_table/main.py
+++ b/mineru/model/table/rec/unet_table/main.py
@@ -183,7 +183,7 @@ class WiredTableRecognition:
continue
# 从img中截取对应的区域
x1, y1, x2, y2 = int(box[0][0])+1, int(box[0][1])+1, int(box[2][0])-1, int(box[2][1])-1
- if x1 >= x2 or y1 >= y2:
+ if x1 >= x2 or y1 >= y2 or x1 < 0 or y1 < 0:
# logger.warning(f"Invalid box coordinates: {x1, y1, x2, y2}")
continue
# 判断长宽比