iuliaturc / detextify

Remove text from AI-generated images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't import PaddleTextDetector (on Mac)

iuliaturc opened this issue · comments

from detextify.text_detector import PaddleTextDetector
Illegal instruction: 4

I actually can't import any of the objects, so it's not PaddleTextDetector in particular.
I suspect this will happen on any machine with no GPU.

Hmm importing paddle also fails on a fresh install in a new virtual environment:

python3 -m venv throwaway
source throwaway/bin/activate
pip install paddlepaddle
pip install paddleocr

And then importing the library causes the same failure as above:

>>> from paddleocr import PaddleOCR
Illegal instruction: 4

And that's because you need to install the right package depending on your platform x cuda installation, see docs.

For mac + CPU, the right incantation is the following:

pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/mac/cpu/develop.html
pip install paddleocr

I can confirm that the latest version of detextify (0.2.1) works on a Mac, after manually installing the right version of paddle.
We'll have to update the README with instructions on how to download paddle.