An OCR tool for the GNU operating system that uses Transformers
.
Supports Xorg and Wayland.
ocr.mp4
Install from the AUR.
If you want to package this program for your distribution and know how to do it, please create a pull request. Otherwise, read the section below.
The steps below are for people who can't access the AUR.
Install the following dependencies if they are not installed.
Install using Makefile:
git clone 'https://github.com/Ajatt-Tools/transformers_ocr.git'
cd -- 'transformers_ocr'
sudo make install
Before you start,
download manga-ocr
data:
transformers_ocr download
The files will be saved to ~/.local/share/manga_ocr
.
To show a help page, run transformers_ocr help
.
To OCR text on a manga page, run:
transformers_ocr recognize
Bind the command to a keyboard shortcut using your WM's config. This enables you to call the OCR from anywhere, as shown in the demo video.
For example, if you use i3wm, add this line to the config file.
bindsym $mod+o exec --no-startup-id transformers_ocr recognize
The first run will take longer than usual.
There are additional files that will be downloaded and saved to ~/.cache/huggingface
.
On the first run transformers_ocr
launches a listener process
that is running is the background and reads any new screenshots passed to it.
To speed up the first run, add the command below to autostart (using ~/.profile
, ~/.xinitrc
, etc.).
transformers_ocr start