Skip to content

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

Update mineru/model/utils/tools/infer/predict_rec.py

Xiaomeng Zhao30fe325428ab
diff --git a/mineru/model/utils/tools/infer/predict_rec.py b/mineru/model/utils/tools/infer/predict_rec.py
index d7363a47..15f2dc1e 100644
--- a/mineru/model/utils/tools/infer/predict_rec.py
+++ b/mineru/model/utils/tools/infer/predict_rec.py
@@ -137,7 +137,7 @@ class TextRecognizer(BaseOCRV20):
h, w = img.shape[:2]
ratio = w / float(h)
ratio_imgH = max(math.ceil(imgH * ratio), self.limited_min_width)
- resized_w = min(imgW,int(ratio_imgH))
+ resized_w = min(imgW, int(ratio_imgH))
resized_image = cv2.resize(img, (resized_w, imgH)) /127.5 - 1
padding_im = np.zeros((imgC, imgH, imgW), dtype=np.float32)
padding_im[:, :, 0:resized_w] = resized_image.transpose((2, 0, 1))