From bb0e23303c3d727a323f90e90cbbce529bbbdcae Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Wed, 4 Mar 2026 18:18:03 +0100 Subject: [PATCH] debug: log RapidOCR upscale dimensions to verify scaling Co-Authored-By: Claude Opus 4.6 --- klausur-service/backend/cv_vocab_pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klausur-service/backend/cv_vocab_pipeline.py b/klausur-service/backend/cv_vocab_pipeline.py index c612fb5..bead1af 100644 --- a/klausur-service/backend/cv_vocab_pipeline.py +++ b/klausur-service/backend/cv_vocab_pipeline.py @@ -4769,6 +4769,8 @@ def _ocr_cell_crop( bgr_crop, min_dim=150, max_scale=3, ) 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_y = up_h / max(ch, 1) was_scaled = (up_w != cw or up_h != ch)