JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
https://www.jaided.ai
Apache License 2.0
23.61k stars 3.1k forks source link

No text detected since 1.7.0 upgrade #1039

Open msnorrason opened 1 year ago

msnorrason commented 1 year ago

Have been using version 1.6.2 on an M1 Mac, with very good results. Upgraded to 1.7.0 using pip and saw an immediate speed improvement, but many of my test cases now returned an empty string. Next time I tried exact same code, all cases produced an empty string. Eventually tried the example code in the readme here in this repo and that failed too:

import easyocr
reader = easyocr.Reader(['ch_sim','en']) # this needs to run only once to load the model into memory
result = reader.readtext('chinese.jpg')
print(result)
>> [ ]

Then used pip to downgrade back to 1.6.2 and everything is back to normal.

Rsikuli commented 1 year ago

I have the same issue using the 1.7.0 version, but it used to work before (a week ago and with the 1.7.0 version still), is there a chance that the python Certificates are causing a problem ?

CTSer commented 1 year ago

I encountered exactly the same problem on M1 Mac for an image with Japanese text. The latest version of EasyOCR simply returns an empty list. Reverting the version to 1.6.2 and running the same command returns the correct output.

An error message or some other sort of message would be extremely helpful in decoding the problem in the latest version.

JaidedTeam commented 1 year ago

This is due to the PR by a Mac user who proposed a way to use Mac's GPU to accelerate the process. We are not sure what is the problem yet because we don't have a Mac machine to test. There is a way to circumvent this problem without downgrading though. Try using the argument gpu=False, like this

reader = easyocr.Reader(['ch_sim','en'], gpu=False)

msnorrason commented 1 year ago

The problem has gone away for me. This time I installed 1.7.0 in a virtual environment using venv. The resulting build did not work, because of a dependency: the current version (10.0.0) of Pillow has removed the ANTIALIAS attribute. pip install Pillow==9.5.0 solved that problem and now 1.7.0 works fine on my M1 MacBook Pro.

HEIZENNBERG commented 4 months ago

im not using mac and im having the same issue any ideas