From cab3fcbcdff5c1031dd349de49676fc819a5276b Mon Sep 17 00:00:00 2001 From: laolitou <13926897+laolitou@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:36:31 +0800 Subject: [PATCH] fix: 'numpy' has no attribute 'astype' (#13554) --- .../fastdeploy_serving/models/det_postprocess/1/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/fastdeploy/serving/fastdeploy_serving/models/det_postprocess/1/model.py b/deploy/fastdeploy/serving/fastdeploy_serving/models/det_postprocess/1/model.py index 9d43832ca5..733dd6a36b 100644 --- a/deploy/fastdeploy/serving/fastdeploy_serving/models/det_postprocess/1/model.py +++ b/deploy/fastdeploy/serving/fastdeploy_serving/models/det_postprocess/1/model.py @@ -202,7 +202,7 @@ def execute(self, requests): 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()