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)
🔎 Search before asking
🐛 Bug (问题描述)
此图片每次OCR识别,必定内存溢出
C++ Traceback (most recent call last):
paddle::AnalysisPredictor::ZeroCopyRun() paddle::framework::NaiveExecutor::Run() paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, phi::Place const&) paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, phi::Place const&) const paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, phi::Place const&, paddle::framework::RuntimeContext) const void phi::HardSwishKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor) void phi::ActivationGPUImpl<float, phi::GPUContext, phi::funcs::CudaHardSwishFunctor >(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor, phi::funcs::CudaHardSwishFunctor const&)
float phi::DeviceContext::Alloc(phi::TensorBase, unsigned long, bool) const
phi::DeviceContext::Impl::Alloc(phi::TensorBase, phi::Place const&, phi::DataType, unsigned long, bool, bool) const
phi::DenseTensor::AllocateFrom(phi::Allocator, phi::DataType, unsigned long, bool)
paddle::memory::allocation::Allocator::Allocate(unsigned long)
paddle::memory::allocation::StatAllocator::AllocateImpl(unsigned long)
paddle::memory::allocation::Allocator::Allocate(unsigned long)
paddle::memory::allocation::Allocator::Allocate(unsigned long)
paddle::memory::allocation::Allocator::Allocate(unsigned long)
paddle::memory::allocation::Allocator::Allocate(unsigned long)
paddle::memory::allocation::CUDAAllocator::AllocateImpl(unsigned long)
std::string phi::enforce::GetCompleteTraceBackString(std::string&&, char const , int)
phi::enforce::GetCurrentTraceBackStringabi:cxx11
---------------------- Error Message Summary: ----------------------
ResourceExhaustedError: Out of memory error on GPU 0. Cannot allocate 2.089966GB memory on GPU 0, 7.469543GB memory has been allocated and available memory is only 362.875000MB.
Please check whether there is any other process using GPU 0.
🏃♂️ Environment (运行环境)
Red Hat Enterprise Linux 8.10 python3.8.13 paddlepaddle-gpu 2.6.1.post117 nvidia A10 8G
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
基于rapidocr_paddle的封装 import cv2
from rapidocr_paddle import RapidOCR
engine = RapidOCR(det_use_cuda=True, cls_use_cuda=True, rec_use_cuda=True) image_path = "tests/1.png" result, elapse_list = engine(image_path)