You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Please fill in the following information completely so that we can solve the problem quickly, thank you! **
Problem Description
paddleOCR converted to onnx model with dynamic input is being run in onnx . first the image needs preprocessing
def preprocess_image(image_path , it = (0, 3, 1, 2) ):
with open(image_path, 'rb') as file:
image_data = file.read()
image_bytes = np.frombuffer(image_data, dtype=np.uint8)
image = cv2.imdecode(image_bytes, cv2.IMREAD_COLOR)
# I would expect your image to be HWC at this point: [H, W, 3]
image_array = image.astype(np.float32) / 255.0
image_array = np.expand_dims(image_array, axis=0) # [1, H, W ,C]
# notice that i reordered the dimensions on transpose !
# N = 1 and C = 3 is moved to the first axis
image_array = np.transpose(image_array, it)
image_array
return image_array
**Please fill in the following information completely so that we can solve the problem quickly, thank you! **
Problem Description
paddleOCR converted to onnx model with dynamic input is being run in onnx . first the image needs preprocessing
When running the model in the runtime ;
More information :
Memory leak in PaddleOCR. PaddleOCR#11639
Error report screenshot
other information
The text was updated successfully, but these errors were encountered: