debug: log RapidOCR upscale dimensions to verify scaling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-04 18:18:03 +01:00
parent 604da26b24
commit bb0e23303c

View File

@@ -4769,6 +4769,8 @@ def _ocr_cell_crop(
bgr_crop, min_dim=150, max_scale=3, bgr_crop, min_dim=150, max_scale=3,
) )
up_h, up_w = upscaled_bin.shape[:2] up_h, up_w = upscaled_bin.shape[:2]
logger.info("_ocr_cell_crop R%02d_C%d: rapid upscale %dx%d -> %dx%d",
row_idx, col_idx, cw, ch, up_w, up_h)
scale_x = up_w / max(cw, 1) scale_x = up_w / max(cw, 1)
scale_y = up_h / max(ch, 1) scale_y = up_h / max(ch, 1)
was_scaled = (up_w != cw or up_h != ch) was_scaled = (up_w != cw or up_h != ch)