From e796658e5450420a035d4568bb7b982f1af97456 Mon Sep 17 00:00:00 2001 From: yunyaoXYY <109218879+yunyaoXYY@users.noreply.github.com> Date: Mon, 6 Mar 2023 13:32:05 +0800 Subject: [PATCH] [Bug Fix] Fix OCR Serving bug. (#1516) fix ocr_serving bug --- .../ocr/PP-OCRv3/serving/models/det_postprocess/1/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vision/ocr/PP-OCRv3/serving/models/det_postprocess/1/model.py b/examples/vision/ocr/PP-OCRv3/serving/models/det_postprocess/1/model.py index a2b581e957..103d51a072 100644 --- a/examples/vision/ocr/PP-OCRv3/serving/models/det_postprocess/1/model.py +++ b/examples/vision/ocr/PP-OCRv3/serving/models/det_postprocess/1/model.py @@ -190,7 +190,7 @@ def execute(self, requests): index] > self.cls_threshold: image_list[index] = cv2.rotate( image_list[index].astype(np.float32), 1) - image_list[index] = np.astype(np.uint8) + image_list[index] = image_list[index].astype(np.uint8) rec_pre_tensors = self.rec_preprocessor.run(image_list) rec_dlpack_tensor = rec_pre_tensors[0].to_dlpack()