Skip to content

识别的图片是否有要求呢? #27

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

Open
yhl-97 opened this issue Apr 6, 2020 · 5 comments
Open

识别的图片是否有要求呢? #27

yhl-97 opened this issue Apr 6, 2020 · 5 comments

Comments

@yhl-97
Copy link

yhl-97 commented Apr 6, 2020

作者您好,我在运行您的项目识别一些图片时出现cannot identified image file错误,请问这是什么原因呢?是否对输入的图片有要求?

@courao
Copy link
Owner

courao commented Apr 6, 2020

你好,我在测试的时候没遇到过类似的问题,查了一下似乎图片本身的问题,PIL模块对这个支持不太好,jpg文件的头部不在jpeg market table中,则会报OSError,可以参考下面的链接,
python-pillow/Pillow#630

@yhl-97
Copy link
Author

yhl-97 commented Apr 6, 2020

谢谢您的回复,我使用的是png图片,也会存在类似的问题吗?

@yhl-97
Copy link
Author

yhl-97 commented Apr 6, 2020

我使用的是IAM的数据,一张图片就是一行文字,错误会和这个有关系吗?

@courao
Copy link
Owner

courao commented Apr 6, 2020

一张图片就是一行文字的数据的话可以使用recognize/crnn_recognizer.py里面的接口,就不需要文字检测的操作了,根据你的需要可以做一些修改。。

@yhl-97
Copy link
Author

yhl-97 commented Apr 6, 2020

好的,感谢您的指点

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

No branches or pull requests

2 participants