Tesseract Open Source OCR Engine
open sourceApache-2.0self-hostablefree
Tesseract is an open source OCR engine, shipped as the libtesseract library and the tesseract command-line program. Since version 4 it uses an LSTM neural network that recognizes whole lines, and it still offers the older character-pattern engine of Tesseract 3. It reads more than 100 languages out of the box, can be trained for others, and writes plain text, hOCR, searchable PDF, TSV, ALTO and PAGE. Developed at Hewlett-Packard from 1985, open sourced in 2005 and developed by Google until 2017, it is now led by Stefan Weil under the Apache-2.0 licence and packaged by many Linux distributions and Homebrew.
Ways to install
Package managers
Problems it solves
- free OCR engine I can run offline to turn scanned pages into text
- turn scanned images into a searchable PDF with an invisible text layer
- read text from images in over 100 languages without a cloud service
- command-line tool to OCR a folder of TIFF and PNG scans from a shell script
- C or C++ library to embed OCR in my own application
- get the position of every word as hOCR, ALTO or TSV so I can map text back onto the image
- train OCR to recognise a language or typeface the stock models handle badly
- Apache-licensed OCR I can ship inside a commercial product
- OCR on a Linux server or Raspberry Pi installed straight from the distro's packages
Features
- LSTM line recognition engine plus the legacy Tesseract 3 engine (--oem 0)
- more than 100 languages out of the box, UTF-8
- trainable for new languages and fonts
- output as plain text, hOCR, PDF, text-only PDF, TSV, ALTO and PAGE
- PNG, JPEG and TIFF (including multipage) input
- page segmentation modes (--psm)
- C and C++ API (libtesseract)
- packages for Linux distributions, Homebrew, MacPorts, Snap, AppImage and Windows installers
Limitations
- Doesn't read handwriting well: its FAQ says it is designed for printed text and points to handwriting-focused projects2
- Doesn't open PDF files as input: it reads images (PNG, JPEG, TIFF) through Leptonica, so PDFs must be rasterized first3
- No graphical interface: it is a command-line program and a C/C++ library; GUIs are third-party projects3
- Doesn't read barcodes: it is for text recognition only2
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what Tesseract does.
- OCRmyPDF Adds a searchable OCR text layer to scanned PDFs
- PaddleOCR Turn any PDF or image document into structured data for your AI
- EasyOCR Ready-to-use OCR with 80+ supported languages and all popular writing scripts
- Mistral OCR Mistral AI's document OCR model and API: PDFs and images to structured Markdown, priced per page
- PP-OCRv5 PaddleOCR's fifth-generation text detection and recognition models, server and mobile sizes
- docTR Document Text Recognition: open source OCR powered by PyTorch