JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.

Home Page:https://www.jaided.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: CUDA error: the launch timed out and was terminated

yuisunn opened this issue · comments

commented

Sometimes this error will be reported torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1
li_txts = self.ocr.readtext(img_arry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anaconda3\Lib\site-packages\easyocr\easyocr.py", line 452, in readtext
horizontal_list, free_list = self.detect(img,
^^^^^^^^^^^^^^^^
File "C:\Users\anaconda3\Lib\site-packages\easyocr\easyocr.py", line 321, in detect
text_box_list = self.get_textbox(self.detector,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anaconda3\Lib\site-packages\easyocr\detection.py", line 95, in get_textbox
bboxes_list, polys_list = test_net(canvas_size, mag_ratio, detector,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anaconda3\Lib\site-packages\easyocr\detection.py", line 51, in test_net
score_text = out[:, :, 0].cpu().data.numpy()
^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: the launch timed out and was terminated
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

use this

conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch