EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

When I use DBnet, and set like guide, it pop up error.

Open CapitaineNemo opened this issue 3 years ago • 5 comments

image

reader = easyocr.Reader(['en'],detect_network = 'dbnet18') "Input type is cpu, but 'deform_conv_cuda.*.so' is not imported successfully."

ENV: Win11; Python ENV: 3.8.8 in Jupyter

CapitaineNemo avatar Nov 24 '22 13:11 CapitaineNemo

Same problem here, any idea on how to solve it?

arcb01 avatar Jan 03 '23 15:01 arcb01

hi guys, did you solve it?

image some how it didn't work, even cuda detected as input device type @JaidedTeam

I have been looking on this scripts

easyocr\DBNet\assets\ops\dcn\functions\deform_conv.py

it seems like there's nothing wrong (for me).

Actually, it did work when using detect_network = 'craft', I just curious how if we use dbnet.

marwanmusa avatar Jun 12 '23 09:06 marwanmusa

I also faced the same error on Ubuntu 22.04, but I can have solved it.

The lack of a CUDA toolkit can cause the failure to compile the source, raising the RuntimeError. Before running the DBNet model, there are some logs about compiling the source for CPU and CUDA. In my case, the lack of nvcc was the cause. You might as well check this out.

yuta0306 avatar Aug 17 '23 09:08 yuta0306

Any update on this issue?

Rbrq03 avatar Aug 29 '24 02:08 Rbrq03

Hi everyone!

In my case I had the same error caused by compilation of deform_conv_cpu failing:

/home/cesar/projects/EasyOCR/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/python_headers.h:12:10: fatal error: Python.h: No such file or directory
   12 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.

This error is cause due to missing Python API for C programming. For Ubuntu you can install it with apt-get:

sudo apt-get install python3-dev 

Not sure how to install it on other OS but it should be easy 🙂

CesarCMa avatar Oct 20 '24 08:10 CesarCMa