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
23k stars 3.03k forks source link

Use merged language #1152

Open MLDovakin opened 9 months ago

MLDovakin commented 9 months ago

I merged ossetian language in https://github.com/JaidedAI/EasyOCR/pull/1108 . But when i try to use ocr fo ossetian i get error. EasyOCR version : easyocr-1.7.1.

import easyocr

reader = easyocr.Reader(['os']) # this needs to run only once to load the model into memory
result = reader.readtext('/content/test2.jpg')]

ValueError                                Traceback (most recent call last)
[<ipython-input-4-2165a1660606>](https://localhost:8080/#) in <cell line: 3>()
      1 import easyocr
      2 
----> 3 reader = easyocr.Reader(['os']) # this needs to run only once to load the model into memory
      4 result = reader.readtext('/content/тест2.jpg')

[/usr/local/lib/python3.10/dist-packages/easyocr/easyocr.py](https://localhost:8080/#) in __init__(self, lang_list, gpu, model_storage_directory, user_network_directory, detect_network, recog_network, download_enabled, detector, recognizer, verbose, quantize, cudnn_benchmark)
    107                 unknown_lang = set(lang_list) - set(all_lang_list)
    108                 if unknown_lang != set():
--> 109                     raise ValueError(unknown_lang, 'is not supported')
    110                 # choose recognition model
    111                 if lang_list == ['en']:

ValueError: ({'os'}, 'is not supported')
codemurt commented 8 months ago

The situation is similar with the Udmurt language (#1084).