mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-09-27 00:53:51 +00:00
revert modified for predict_rec
This commit is contained in:
parent
1c8cddf46f
commit
2cc1d00b04
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user