DayBreak-u / chineseocr_lite

超轻量级中文ocr,支持竖排文字识别, 支持ncnn、mnn、tnn推理 ( dbnet(1.8M) + crnn(2.5M) + anglenet(378KB)) 总模型仅4.7M
GNU General Public License v2.0
11.84k stars 2.26k forks source link

onnxruntime::BFCArena::AllocateRawInternal Failed to allocate memory for requested buffer of size 285081600 #355

Open QGB opened 3 years ago

QGB commented 3 years ago
2021-07-08:01:27:49,975 INFO     [web.py:2243] 304 GET / (127.0.0.1) 2.00ms
2021-07-08 01:27:55.7944269 [E:onnxruntime:, sequential_executor.cc:339 onnxruntime::SequentialExecutor::Execute] Non-zero status code returned while running Conv node. Name:'347_nchwc' Status Message: D:\a\_work\1\s\onnxruntime\core\framework\bfc_arena.cc:330 onnxruntime::BFCArena::AllocateRawInternal Failed to allocate memory for requested buffer of size 285081600

2021-07-08:01:27:55,801 ERROR    [web.py:1793] Uncaught exception POST /api/tr-run/ (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8089', method='POST', uri='/api/tr-run/', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "C:\QGB\Anaconda3\lib\site-packages\tornado\web.py", line 1704, in _execute
    result = await result
  File "C:\QGB\Anaconda3\lib\site-packages\tornado\gen.py", line 216, in wrapper
    result = ctx_run(func, *args, **kwargs)
  File "d:\github\chineseocr_lite\backend\webInterface\tr_run.py", line 145, in post
    res = ocrhandle.text_predict(img,short_size)
  File "d:\github\chineseocr_lite\model.py", line 79, in text_predict
    boxes_list, score_list = self.text_handle.process(np.asarray(img).astype(np.uint8),short_size=short_size)
  File "d:\github\chineseocr_lite\dbnet\dbnet_infer.py", line 79, in process
    out = self.sess.run(["out1"], {"input0": transformed_image.astype(np.float32)})
  File "C:\QGB\Anaconda3\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 188, in run
    return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Conv node. Name:'347_nchwc' Status Message: D:\a\_work\1\s\onnxruntime\core\framework\bfc_arena.cc:330 onnxruntime::BFCArena::AllocateRawInternal Failed to allocate memory for requested buffer of size 285081600

2021-07-08:01:27:55,814 ERROR    [web.py:2243] 500 POST /api/tr-run/ (127.0.0.1) 665.62ms
QGB commented 3 years ago

这是因为内存不足吗

Tanxj commented 3 months ago

是的