Skip to content
Discussion options

You must be logged in to vote

Hello, in PPOCRv5, the shape of the np.array must be [H, W, 3]. An array with shape [H, W] will result in an error during the preprocessing normalization stage due to the absence of shape[2]. You can use code img = np.dstack([img]*3) to convert an image from [H, W] to [H, W, 3] before inputting it into the ocr.predict() function.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@zixinnie-rti
Comment options

Comment options

You must be logged in to vote
3 replies
@zixinnie-rti
Comment options

@liuhongen1234567
Comment options

Answer selected by zixinnie-rti
@zixinnie-rti
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants