diff --git a/tools/infer/predict_rec.py b/tools/infer/predict_rec.py index 41e556bd15cbad16586e9e2ea5f39aa5b096cc81..cc580a69f741ae436fcc65f546083d311947b12c 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: