PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.48k stars 7.84k forks source link

Out of memory error on GPU #8783

Closed danbao12138 closed 1 year ago

danbao12138 commented 1 year ago

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

Out of memory error on GPU 0. Cannot allocate 8.254151GB memory on GPU 0, 5.149536GB memory has been allocated and available memory is only 6.752441GB.

Please check whether there is any other process using GPU 0.

  1. If yes, please stop them, or start PaddlePaddle on another GPU.
  2. If no, please decrease the batch size of your model.

    (at /paddle/paddle/fluid/memory/allocation/cuda_allocator.cc:79)

大部分图片识别时只需要1G多显存就可以正常识别,但是个别图片就会要求分配8.254151GB的显存导致OOM

tink2123 commented 1 year ago

当表格中存在的单元格过多时,可能会导致显存占用过大。

danbao12138 commented 1 year ago

当表格中存在的单元格过多时,可能会导致显存占用过大。

1,图片中并没有过多的单元格,许多可以正常识别的图片包含的单元格要比这几张导致OOM的单于格多的多。 2,当我清理出8G多的显存来跑这些个别的图片的时候,输出并没有什么不同,检测出的单于格也是正常的。 3,我的图片大部分都是50K左右,大小都在(631, 338)左右 4,甚至,我将这些导致OOM的图片去掉一行像素,或者进行简单裁剪都能过正常识别,但是这不能根本上解决问题,因为并不知道哪些图片需要裁剪。

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.