mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-11-12 08:03:34 +00:00
fix sar infer shape
This commit is contained in:
parent
8e3aa3a09b
commit
b7ca8c8070
@ -280,6 +280,7 @@ class TextRecognizer(object):
|
|||||||
img -= mean
|
img -= mean
|
||||||
img *= stdinv
|
img *= stdinv
|
||||||
return img
|
return img
|
||||||
|
|
||||||
def resize_norm_img_svtr(self, img, image_shape):
|
def resize_norm_img_svtr(self, img, image_shape):
|
||||||
|
|
||||||
imgC, imgH, imgW = image_shape
|
imgC, imgH, imgW = image_shape
|
||||||
@ -325,7 +326,7 @@ class TextRecognizer(object):
|
|||||||
for beg_img_no in range(0, img_num, batch_num):
|
for beg_img_no in range(0, img_num, batch_num):
|
||||||
end_img_no = min(img_num, beg_img_no + batch_num)
|
end_img_no = min(img_num, beg_img_no + batch_num)
|
||||||
norm_img_batch = []
|
norm_img_batch = []
|
||||||
imgC, imgH, imgW = self.rec_image_shape
|
imgC, imgH, imgW = self.rec_image_shape[:3]
|
||||||
max_wh_ratio = imgW / imgH
|
max_wh_ratio = imgW / imgH
|
||||||
# max_wh_ratio = 0
|
# max_wh_ratio = 0
|
||||||
for ino in range(beg_img_no, end_img_no):
|
for ino in range(beg_img_no, end_img_no):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user