Classic

OCR_AI

AI OCR helper for text detection/recognition workflows.

10 config keys · 5 public methods

Import

from Xenonix.Classic import OCR_AI

Search this API

Filter methods, arguments, and configuration keys on this page.

Configuration

Use Config(...) with these keys where the class exposes configuration.

Config key Default Common values What it controls
Threshold_Bin 0.3 Any valid value Threshold Bin setting for OCR_AI.
Threshold_Poly 0.5 Any valid value Threshold Poly setting for OCR_AI.
GPU True True, False Uses GPU acceleration where available.
Torch_Free_OCR Torch_Free_OCR_Available Any valid value Torch Free OCR setting for OCR_AI.
Easy_OCR Easy_OCR_Available Any valid value Easy OCR setting for OCR_AI.
Easy_OCR_Directory 'Model' Any valid value Easy OCR Directory setting for OCR_AI.
Easy_OCR_Langs ['en'] Any valid value Easy OCR Langs setting for OCR_AI.
PyTesseract PyTesseract_Available Any valid value PyTesseract setting for OCR_AI.
PyTesseract_Command '/usr/bin/tesseract' Any valid value PyTesseract Command setting for OCR_AI.
PyTesseract_Config '' Any valid value PyTesseract Config setting for OCR_AI.

Public methods

Create

Creates a new OCR_AI instance.

Create()

Arguments

No arguments.

Output

Creates a new OCR_AI object.

Config_Get

Reads one or more configuration values by name.

Config_Get(*Input)

Arguments

Argument Default Accepted values What it does
Input *args Any valid value Input value used by the operation.

Output

Returns selected configuration values.

Config

Changes one or more supported settings. Pass only the configuration keys you want to update.

Config(**Input)

Arguments

Argument Default Accepted values What it does
Input **kwargs Any valid value Input value used by the operation.

Output

Updates configuration values on the object.

Create

Runs the Create operation for OCR_AI.

Create(Det_Model_Path=None, Rec_Model_Path=None, Vocab_Path=None)

Arguments

Argument Default Accepted values What it does
Det_Model_Path None Any valid value Det Model Path value used by the operation.
Rec_Model_Path None Any valid value Rec Model Path value used by the operation.
Vocab_Path None Any valid value Vocab Path value used by the operation.

Output

Runs the operation. Some methods update the object in place.

Find

Runs the main operation and returns the detected/calculated result.

Find(Frame, Region=None, Pick='All', Index=None)

Arguments

Argument Default Accepted values What it does
Frame Required Any valid value Input image/frame data. Can be an image object, array, or frame accepted by this tool.
Region None Any valid value Region of interest used to limit where the operation runs.
Pick 'All' LAST, FIRST, ALL Selects which candidate/result should be returned.
Index None Any valid value Index value used by the operation.

Output

Returns structured data such as a list or dictionary.