This tool provides a graphical interface to tesseract. Images can be loaded via a file chooser window or drag-and-drop. The result fulltext-files can also be edited.
The purpose of this project is to provide a gui application for tesseract with some extras.
Application features
┣━ Do OCR (single or batchwise)
┣━ Save/Load tesseract settings
┣━ Open PDFs with external applications (Webbrowser,..)
┣━ Convert PDF to images
┣━ Edit images (Rotation, Coloradjustements,..)
┣━ Evaluate output (Character occurencies)
┣━ Compare results with different settings
┣━ Edit fulltext outputs (Text, ALTO, hOCR, TSV)
┗━ Ease-to-Use online search engine for new models
Tesseract is a commandline based OCR engine. Tesseract has unicode (UTF-8) support, and can recognize more than 100 languages "out of the box".
There are several 3rdParty projects to provide a gui for Tesseract, but they all lack in some way.
Any image readable by Leptonica is supported in Tesseract including BMP, PNM, PNG, JFIF, JPEG, and TIFF. GIF and PDF is not supported, but PDF can be converted to readable imageformats.
The official models are divided into three types tessdata_best, tessdata_fast and tessdata.
The models can be furthermore categorized into language (e.g. german) and script (e.g. latin) models. While script models are trained for a whole writing systems and the integrated dictionary is really broad, the language models are trained with a subset of a writing system and contains a language specific dictionary.
The models names are abbrevations as deu for the standard german (deutsch) language model and further information to the models are hard to find. The models need to be downloaded and installed to the tessdatapath.
Thats why, the application provides an online model search engine with more metadata information for each model. Finding and installing new models are now easy and straight forward.
Tesseract supports various output formats: plain text, hOCR (HTML), PDF, invisible-text-only PDF, TSV. The master branch also has experimental support for ALTO (XML) output.
The application allows to edit plain text, hOCR, ALTO and TSV and store the result for further use.
See Issues for planned features and current progress.
This is project is currently in an early development stage and not very polished. All the features described below are functional, however.
See the wiki for details on the python package.
It is recommended to use a virtual environment.
python3 -m venv venv
source venv/bin/activate
sudo apt-get install python3-sdl2
pip install --upgrade pip
pip install .[app]
If you use zsh-commandline you need to escape brackets with backslash!
For windows please use the current installer. (recommended)
Alternative: Build it from source
python3 -m venv venv
venv\Scripts\activate.bat
pip install --upgrade pip
pip install .[all-win]
Don't install kivy-gstreamer on Windows!
The standard text renderer can't display combined glyphs correctly, to do that an alternative text renderer needs to be used e.g. pango2:
- Install pangoft2 (
apt install libfreetype6-dev libpango1.0-dev libpangoft2-1.0-0
) or ensure it is available in pkg-config - Recompile kivy. Check that pangoft2 is found
use_pangoft2 = 1
- Test it! Enforce the text core renderer to pango using environment variable:
export KIVY_TEXT=pango
Start the GUI:
tesseractXplore
The basic UI components are shown below:
- Drag & drop images or folders into the window.
- Or, select files via the file browser on the right
- Enter tesseract settings
- Click the 'Run' button in the lower-left to recognize the selected images
Other things to do:
Sometimes it can be handy to have settings profiles like for historical documents with just one column. The application allows to save settings into a profile with an individual name. To reset the settings to default or to search and load user stored profiles.
If you don't have a suitable model, click the 'Find a new model' button to go to the model search screen. You can start with searching by name, with autocompletion support:
You can also run a full search using the additional filters. For example, with group attributes (tessdata,..), tags (medival) or select the model type (Fast/Best) or category (Language/Script):
On the right side of the window is an information page with download option.
There are also some settings to customize the application and global parameters. And yes, there is a dark mode, because why not.
Some keyboard shortcuts are included for convenience:
Key(s) | Action | Screen |
---|---|---|
F1 | Switch to kivy settings | All |
F2 | Switch to app settings | All |
F5 | Switch to home screen | All |
F6 | Switch to model selection | All |
F7 | Switch to model search | All |
F9 | Toggle online/offline | All |
F10 | Toggle borderless | All |
F11 | Toggle fullscreen | All |
F11 | Toggle dark/light mode | All |
Ctrl+S | Save settings | All |
Ctrl+Q | Quit | All |
Ctrl+R | Reset tesseract settings | Image selection |
Ctrl+O | Open selected image folder | Image selection |
Ctrl+'+' | Zoom in | Image selection |
Ctrl+'-' | Zoom out | Image selection |
Ctrl+Enter | Run model search | Model search |
Ctrl+Enter | Run image tagger | Image selection |
Shift+Ctrl+X | Clear selected images | Image selection |
Shift+Ctrl+X | Clear search filters | Model search |
This project exists thanks to all the people who contribute. Thanks for all the testing and feeback.
- This project is based on naturtag.