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
24.52k stars 3.16k forks source link

"detector=False" exception #1267

Closed neilyoung closed 5 months ago

neilyoung commented 5 months ago
reader = easyocr.Reader(['de', 'en'], gpu=True, detector=False)
result = reader.readtext(sys.argv[1], detail=1,  allowlist="ABCDEFGHIJKLMNOPQRSTUVXXYZ ÄÖÜ0123456789")
Traceback (most recent call last):
  File "/home/ubuntu/test.py", line 11, in <module>
    result = reader.readtext(sys.argv[1], detail=1,  allowlist="ABCDEFGHIJKLMNOPQRSTUVXXYZ ÄÖÜ0123456789")
  File "/home/ubuntu/.local/lib/python3.10/site-packages/easyocr/easyocr.py", line 456, in readtext
    horizontal_list, free_list = self.detect(img, 
  File "/home/ubuntu/.local/lib/python3.10/site-packages/easyocr/easyocr.py", line 321, in detect
    text_box_list = self.get_textbox(self.detector, 
AttributeError: 'Reader' object has no attribute 'get_textbox'

Works, when I don't set detector=False. I just need the recognizer, since the image is already cropped to the detected license plate in this case