Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch_PP-OCRv4_rec_infer识别乱码 #12093

Closed
cloudfool opened this issue May 10, 2024 · 4 comments
Closed

ch_PP-OCRv4_rec_infer识别乱码 #12093

cloudfool opened this issue May 10, 2024 · 4 comments
Assignees

Comments

@cloudfool
Copy link

我用tools/infer/predict_rec.py调用ch_PP-OCRv4_rec_infer模型识别下面两张图时发现识别结果分别是“冏下點”和“冏干文”,请问这是什么原因?谢谢
img_crop_冏下點
img_crop_冏干文

@UserWangZz
Copy link
Collaborator

python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./your inference model" --rec_image_shape="3, 48, 320" --rec_char_dict_path="your text dict path"
检查一下是不是模型和字典不匹配

@cloudfool
Copy link
Author

python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./your inference model" --rec_image_shape="3, 48, 320" --rec_char_dict_path="your text dict path" 检查一下是不是模型和字典不匹配

我觉得应该没问题,跑其他图片都是可以的; 你要不帮我测试一下这两张 看看是不是和我的识别结果相同?

@UserWangZz
Copy link
Collaborator

我复现一下

@UserWangZz
Copy link
Collaborator

image
我这边复现第一张图也出现你所说的问题,怀疑是文字两边的空白太大,我单独截出文字部分识别是正常的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants