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

Error on Loading "Tamil" language #1251

Open kokul93 opened 2 months ago

kokul93 commented 2 months ago

When I load the tamil language as following code , import os import easyocr reader = easyocr.Reader(['ta'])

But It does not load,

Following errors appear

WARNING:easyocr.easyocr:Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU.

RuntimeError Traceback (most recent call last) in <cell line: 3>() 1 import os 2 import easyocr ----> 3 reader = easyocr.Reader(['ta'])

2 frames /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict, assign) 2151 2152 if len(error_msgs) > 0: -> 2153 raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( 2154 self.class.name, "\n\t".join(error_msgs))) 2155 return _IncompatibleKeys(missing_keys, unexpected_keys)

RuntimeError: Error(s) in loading state_dict for Model: size mismatch for Prediction.weight: copying a param with shape torch.Size([143, 512]) from checkpoint, the shape in current model is torch.Size([127, 512]). size mismatch for Prediction.bias: copying a param with shape torch.Size([143]) from checkpoint, the shape in current model is torch.Size([127]).

vamshi-1611 commented 2 months ago

i also faced the same issue i have resolve it as below open opt.txt file character list and paste it in your ta.yaml file and push to ~./user_network/ta.yaml