Commit 2cc1d00b authored by tink2123's avatar tink2123
Browse files

revert modified for predict_rec

parent 1c8cddf4
...@@ -53,7 +53,7 @@ class TextRecognizer(object): ...@@ -53,7 +53,7 @@ class TextRecognizer(object):
imgC, imgH, imgW = self.rec_image_shape imgC, imgH, imgW = self.rec_image_shape
assert imgC == img.shape[2] assert imgC == img.shape[2]
if self.character_type == "ch": if self.character_type == "ch":
imgW = int(math.ceil(32 * max_wh_ratio)) imgW = int((32 * max_wh_ratio))
h, w = img.shape[:2] h, w = img.shape[:2]
ratio = w / float(h) ratio = w / float(h)
if math.ceil(imgH * ratio) > imgW: if math.ceil(imgH * ratio) > imgW:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment