tesseract训练字库遇到的问题

报错信息

Traceback (most recent call last):
  File "//192.168.1.241/Share/yan/cv_parser/textYan.py", line 9, in <module>
    code = pytesseract.image_to_string(image)
  File "D:\python27\lib\site-packages\pytesseract\pytesseract.py", line 193, in image_to_string
    return run_and_get_output(image, 'txt', lang, config, nice)
  File "D:\python27\lib\site-packages\pytesseract\pytesseract.py", line 130, in run_and_get_output
    temp_name, img_extension = save_image(image)
  File "D:\python27\lib\site-packages\pytesseract\pytesseract.py", line 86, in save_image
    image.save(input_file_name, format=img_extension, **image.info)
  File "D:\python27\lib\site-packages\PIL\Image.py", line 1406, in save
    self.load()
  File "D:\python27\lib\site-packages\PIL\ImageFile.py", line 189, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "D:\python27\lib\site-packages\PIL\Image.py", line 385, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder zip not available

解决

卸载pillow重新下载pillow==5.1.0

报错信息

生成训练文件时
PPLY_BOXES: boxfile line 17/c ((117,14),(125,20)): FAILURE! Couldn't find a matching blob

解决

原因是坐标无法识别,重新调整坐标

报错

cntraining.exe无法执行

解决

cntraining  -F eml_my.font.expo.tr
加-F

猜你喜欢

转载自blog.csdn.net/xiaowo_/article/details/80083246