FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

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

Open Noobzm opened this issue 10 months ago • 4 comments

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

Noobzm avatar Apr 22 '24 10:04 Noobzm

mmexport1713781308568

Noobzm avatar Apr 22 '24 10:04 Noobzm

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

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

Noobzm avatar Apr 23 '24 08:04 Noobzm

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

heliqi avatar Apr 24 '24 04:04 heliqi

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

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

Noobzm avatar Apr 25 '24 09:04 Noobzm