Responder a: Could not initialize tesseract.

Home Fóruns Fórum Reconhecimento de Textos com OCR e Python Could not initialize tesseract. Responder a: Could not initialize tesseract.

#44897
Gabriel Alves
Moderador

    Olá! Essa dúvida você havia postado em outro tópico, mas só para deixar respondido nesse também:

    Para fazer isso, basta usar esse comando para fazer o download do modelo

    !wget -O ./tessdata/por.traineddata https://github.com/tesseract-ocr/tessdata/blob/main/por.traineddata?raw=true

    Então, na sequência usar esse código:

    config_tesseract = ‘–tessdata-dir tessdata’
    texto = pytesseract.image_to_string(rgb, lang=’por’, config=config_tesseract)