read_text2.py 306 B

1234567891011
  1. #pip install easyocr
  2. import easyocr
  3. reader = easyocr.Reader(['ch_sim','en'], gpu=False) # this needs to run only once to load the model into memory
  4. result = reader.readtext('test1.png')
  5. print(result)
  6. result = reader.readtext('test2.jpg')
  7. print(result)
  8. result = reader.readtext('test3.jpg')
  9. print(result)