Closed yancccc closed 3 months ago
The CPU runs fine, but the GPU runs with an error
(ocr) ps@ps:~/ycc/ocr/EasyOCR-master$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 (ocr) ps@ps:~/ycc/ocr/EasyOCR-master$ cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
--
/ cannot use constexpr here since this is a C-only file /
import easyocr reader = easyocr.Reader(['ch_sim','en']) # this needs to run only once to load the model into memory result = reader.readtext('1.jpg',detail = 0,paragraph="False") print(result) use pyinstaller error: Traceback (most recent call last): File "1.py", line 3, in
result = reader.readtext('1.jpg',detail = 0,paragraph="False")
File "easyocr/easyocr.py", line 456, in readtext
horizontal_list, free_list = self.detect(img,
File "easyocr/easyocr.py", line 321, in detect
text_box_list = self.get_textbox(self.detector,
File "easyocr/detection.py", line 95, in get_textbox
bboxes_list, polys_list = test_net(canvas_size, mag_ratio, detector,
File "easyocr/detection.py", line 46, in test_net
y, feature = net(x)
File "torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
File "torch/nn/modules/module.py", line 1562, in _call_impl
File "torch/nn/parallel/data_parallel.py", line 184, in forward
File "torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
File "torch/nn/modules/module.py", line 1562, in _call_impl
File "easyocr/craft.py", line 60, in forward
sources = self.basenet(x)
File "torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
File "torch/nn/modules/module.py", line 1562, in _call_impl
File "easyocr/model/modules.py", line 68, in forward
h = self.slice1(X)
File "torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
File "torch/nn/modules/module.py", line 1562, in _call_impl
File "torch/nn/modules/container.py", line 219, in forward
File "torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
File "torch/nn/modules/module.py", line 1562, in _call_impl
File "torch/nn/modules/conv.py", line 458, in forward
File "torch/nn/modules/conv.py", line 454, in _conv_forward
RuntimeError: CUDNN_BACKEND_TENSOR_DESCRIPTOR cudnnFinalize failed cudnn_status: CUDNN_STATUS_NOT_INITIALIZED