This app is a free and open source offline App that can be installed on a local compter to run Tibetan OCR on batches of images (including in PDFs). It was developed by Eric Werner for the Buddhist Digital Resource Center.
The app can open one or multiple files and run OCR on them. It can export plain text or PageXML (a format it shares with Transkribus).
It can also optionally dewarp images as well as convert the output to Wylie.
Instead of providing one model that can handle all styles of Tibetan writing, we provide a few different models that we encourage users to experiment with to see what fits their data best.
The models it uses are based on transcriptions available online, from BDRC, ALL, Adarsha, and NorbuKetaka, as well as some transcriptions by MonlamAI and the author. The data was organized and processed in collaboration with MonlamAI, and parts of it can be made available on request.
- Download and unzip https://github.com/buda-base/tibetan-ocr-app/releases/download/v0.1/bdrc_ocr_windows_x64_0.1.zip
- Run
main.exe
- configure the models (see below)
This app does not have a package for MacOS on Intel processors at the moment (contributions welcome!). For Apple (M1, M2, etc.) processors:
- Download and unzip
- for recent hardware https://github.com/buda-base/tibetan-ocr-app/releases/download/v0.1/bdrc_ocr_macos_arm64_0.1.zip
- for older x64 (Intel) processor https://github.com/buda-base/tibetan-ocr-app/releases/download/v0.1/bdrc_ocr_macos_x64_0.1.zip
- Run the app
- configure the models (see below)
- Make sure you have Git LFS installed
- Clone the Github repository:
git clone https://github.com/buda-base/tibetan-ocr-app.git
- run
git lfs pull
to download all LFS files - Install dependencies with
pip install -r requirements.txt
(requires at least Python 3.10) - run
pyside6-rcc resources.qrc -o resources.py
- Run
python main.py
- configure the models (see below)
- Download and unzip https://github.com/buda-base/tibetan-ocr-app/releases/download/v0.1/bdrc_ocr_models_1.0.zip in a directory of your choice
- Open the app, click on the setting icon, click on "import models" and select the
ORCModels/
folder where you extracted the model zip file. Warning! Do not select one of its subfolders (likeWoodblock/
, etc.). - Then quit the app and run it again so that the models can be used.
pip install nuitka
- (optional) install
ccache
to speed up the compilation (on OSX this can be done through homebrew) - run the nuitka command given in main.py that corresponds to your OS
- zip the files in the corresponding build folder
Our gratitude goes to Jérémy Frère for the OSX packaging.