CreateOCROptions
10/22/22Less than 1 minute
CreateOCROptions
ocr.CreateOCROptions
Options passed to createOCR when constructing an OCR engine.
Table of contents
Properties
Properties
parallelThreads
• Optional parallelThreads: number
Number of parallel worker threads. Default 4. More threads can improve throughput at the cost of CPU and memory.
cpuPowerMode
• Optional cpuPowerMode: CPUPowerMode
CPU scheduling / power preset. Default LITE_POWER_HIGH.
useOpenCL
• Optional useOpenCL: boolean
Whether to use OpenCL acceleration. Default false. Requires device/driver support.
models
• Optional models: 'default' | 'slim' | string
Which model bundle to load:
'default'— higher accuracy, slower (default).'slim'— lighter model, faster, lower accuracy.string— absolute path to a custom model directory.
labelsFile
• Optional labelsFile: string
Optional labels file for custom models (character / class mapping). Usually used together with a custom models path.
