Plugins

Plugins are the bread and butter of ocr_translate.

The base project implements functionalities to handle the web server, database, translation pipelines and queues.

How and which models are used is implemented entirely in plugins.

Plugins can be installed by using the plugin collapsable menu on the extension, or by directly using the manage_plugins/ endpoint (see here).

ocr_translate-hugging_face

HOMEPAGE

Plugin for using Hugging Face models for OCR and translation.

Implements VED models for OCR and Seq2Seq models for translation.

Plugin or associated packages environment variables

Title

Variable

Default

Usage

TRANSFORMERS_CACHE

$OCT_BASE_DIR/models/huggingface

Directory where Hugging Face models are being

stored (either downloaded manually or downloaded

by transformers)

TRANSFORMERS_OFFLINE

0

By default transformers will try to download

missing models. Set this to 1 to only work in

offline mode

ocr_translate-easyocr

HOMEPAGE

Plugin for using EasyOCR models for BBox detection.

Plugin or associated packages environment variables

Title

Variable

Default

Usage

EASYOCR_PREFIX

$OCT_BASE_DIR/models/easyocr

Directory where EasyOCR downloads its models

ocr_translate-tesseract

HOMEPAGE

Plugin for using Tesseract models for OCR. This requires tesseract to be installed on your machine.

Plugin or associated packages environment variables

Title

Variable

Default

Usage

TESSERACT_PREFIX

$OCT_BASE_DIR/models/tesseract

Directory where tesseract downloads its models

TESSERACT_ALLOW_DOWNLOAD

true

Control whether the app should download missing

models (true) or work in offline mode only (false)

ocr_translate-paddle

HOMEPAGE

Plugin for using PaddleOCR models for BBox detection and OCR.

Title

Variable

Default

Usage

PADDLEOCR_PREFIX

$OCT_BASE_DIR/models/paddleocr

Directory where PaddleOCR downloads its models

ocr_translate-ollama

HOMEPAGE

Plugin for using LLMs through ollama for translation.

The Ollama server needs to be setup independently.

Title

Variable

Default

Usage

OCT_OLLAMA_ENDPOINT

http://127.0.0.1:11434/api

Endpoint where the ollama server is running

ocr_translate-google

HOMEPAGE

Plugin for using Google Translate for translation.

This plugins requires an internet connection and will send the text to be translated to google.

Title

Variable

Default

Usage

EMPTY

EMPTY

EMPTY