From 2cc1d00b049f2cb0edeb5ce5f899351e8f7c615e Mon Sep 17 00:00:00 2001 From: tink2123 Date: Tue, 30 Jun 2020 14:47:24 +0800 Subject: [PATCH] revert modified for predict_rec --- tools/infer/predict_rec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/infer/predict_rec.py b/tools/infer/predict_rec.py index 41e556bd..cc580a69 100755 --- a/tools/infer/predict_rec.py +++ b/tools/infer/predict_rec.py @@ -53,7 +53,7 @@ class TextRecognizer(object): imgC, imgH, imgW = self.rec_image_shape assert imgC == img.shape[2] if self.character_type == "ch": - imgW = int(math.ceil(32 * max_wh_ratio)) + imgW = int((32 * max_wh_ratio)) h, w = img.shape[:2] ratio = w / float(h) if math.ceil(imgH * ratio) > imgW: -- GitLab