From 1fd357dd978307ad2d8622f8dcbadc482dd7529c Mon Sep 17 00:00:00 2001 From: max Date: Thu, 30 Oct 2025 16:20:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=BD=93h=E6=81=B0=E5=A5=BD=E6=98=AFRESOLU?= =?UTF-8?q?TION=5FGROUP=5FSTRIDE=E7=9A=84=E5=80=8D=E6=95=B0=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E9=94=99=E8=AF=AF=E5=9C=B0=E5=90=91=E4=B8=8A?= =?UTF-8?q?=E5=8F=96=E6=95=B4=E5=88=B0=E4=B8=8B=E4=B8=80=E4=B8=AA=E5=80=8D?= =?UTF-8?q?=E6=95=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mineru/backend/pipeline/batch_analyze.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mineru/backend/pipeline/batch_analyze.py b/mineru/backend/pipeline/batch_analyze.py index ef9a61f1..94d3f338 100644 --- a/mineru/backend/pipeline/batch_analyze.py +++ b/mineru/backend/pipeline/batch_analyze.py @@ -289,8 +289,8 @@ class BatchAnalyze: h, w = cropped_img.shape[:2] # 使用更大的分组容差,减少分组数量 # 将尺寸标准化到32的倍数 - normalized_h = ((h + RESOLUTION_GROUP_STRIDE) // RESOLUTION_GROUP_STRIDE) * RESOLUTION_GROUP_STRIDE # 向上取整到32的倍数 - normalized_w = ((w + RESOLUTION_GROUP_STRIDE) // RESOLUTION_GROUP_STRIDE) * RESOLUTION_GROUP_STRIDE + normalized_h = ((h + RESOLUTION_GROUP_STRIDE - 1) // RESOLUTION_GROUP_STRIDE) * RESOLUTION_GROUP_STRIDE # 向上取整到32的倍数 + normalized_w = ((w + RESOLUTION_GROUP_STRIDE - 1) // RESOLUTION_GROUP_STRIDE) * RESOLUTION_GROUP_STRIDE group_key = (normalized_h, normalized_w) resolution_groups[group_key].append(crop_info)