fix infer shape
parent
68e52250f3
commit
7488bc1db5
|
@ -89,6 +89,7 @@ class TextRecognizer(object):
|
|||
imgC, imgH, imgW = self.rec_image_shape
|
||||
assert imgC == img.shape[2]
|
||||
if self.character_type == "ch":
|
||||
max_wh_ratio = max(max_wh_ratio, imgW / imgH)
|
||||
imgW = int((32 * max_wh_ratio))
|
||||
h, w = img.shape[:2]
|
||||
ratio = w / float(h)
|
||||
|
|
Loading…
Reference in New Issue