You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import easyocr
reader = easyocr.Reader(['th','en'])
text = reader.readtext('abc.jpg')
print(text)
Console Output
% python3 mytest.py
Traceback (most recent call last):
File "mytest.py", line 2, in <module>
reader = easyocr.Reader(['th','en'])
File "/usr/local/lib/python3.7/site-packages/easyocr/easyocr.py", line 166, in __init__
self.detector = get_detector(DETECTOR_PATH, self.device)
File "/usr/local/lib/python3.7/site-packages/easyocr/detection.py", line 61, in get_detector
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device)))
File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 773, in _legacy_load
result = unpickler.load()
File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 729, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 814, in restore_location
result = map_location(storage, location)
TypeError: 'bool' object is not callable
The text was updated successfully, but these errors were encountered:
Code
Console Output
The text was updated successfully, but these errors were encountered: