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

特定图像会导致OCR例子内存报错core #2439

Open
Noobzm opened this issue Apr 22, 2024 · 4 comments
Open

特定图像会导致OCR例子内存报错core #2439

Noobzm opened this issue Apr 22, 2024 · 4 comments
Assignees

Comments

@Noobzm
Copy link

Noobzm commented Apr 22, 2024

这张图像,跑python ppocr 默认配置例子,正常推理,python程序退出时直接core,转成jpg后不会,其它图像暂时不会。

@Noobzm
Copy link
Author

Noobzm commented Apr 22, 2024

mmexport1713781308568

@Noobzm
Copy link
Author

Noobzm commented Apr 23, 2024

问题解决。原因是我在读取图像后,利用图像切片操作
img = cv2.imread(img_name)[:, :, ::-1]
转成了RGB后送入predict,导致出现该问题,predict接收的应该是BGR图像,无须该转换。

但是也奇怪,即便送入RGB图像也能推理出正常结果,且大多数其它图片不会core(程序退出自动回收内存时core),可以看下为什么

@heliqi
Copy link
Collaborator

heliqi commented Apr 24, 2024

如果不转在回收时不会出core,只是切片了下导致出core了?

@Noobzm
Copy link
Author

Noobzm commented Apr 25, 2024

如果不转在回收时不会出core,只是切片了下导致出core了?

是的,可以试下用我发的这张图像是否能复现

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