Configuration options¶
The configuration options are provided when the engine is initialized and they are case-sensitive.
Sample config on ARM devices:
{
"debug_level": "info",
"debug_write_input_image_enabled": false,
"debug_internal_data_path": ".",
"num_threads": -1,
"gpgpu_enabled": true,
"gpgpu_workload_balancing_enabled": true,
"format": "e13b",
"segmenter_accuracy": "high",
"interpolation": "bilinear",
"roi": [0, 0, 0, 0],
"score_type": "min",
"min_score": 0.3
}
debug_level¶
Defines the debug level to output on the console. You should use “verbose” for diagnostic, “info” in development stage and “warn” in production. |
|
type |
string |
pattern |
“verbose” | “info” | “warn” | “error” | “fatal” |
debug_write_input_image_enabled¶
Whether to write the transformed input image to the disk. This could be useful for debugging. |
|
type |
bool |
pattern |
true | false |
debug_internal_data_path¶
Path to the folder where to write the transformed input image. Used only if debug_write_input_image_enabled is true. |
|
type |
string |
pattern |
folder path |
license_token_file¶
Path to the file containing the license token. First you need to generate a Runtime Key using |
|
type |
string |
pattern |
file path |
license_token_data¶
Base64 string representing the license token. First you need to generate a Runtime Key using |
|
type |
string |
pattern |
base64 |
num_threads¶
Defines the maximum number of threads to use. You should not change this value unless you know what you’re doing. Set to -1 to let the SDK choose the right value. The right value the SDK will choose will likely be equal to the number of virtual core. For example, on an octa-core device the maximum number of threads will be 8. |
|
type |
int |
pattern |
[-inf, +inf] |
gpgpu_enabled¶
Whether to enable GPGPU computing. This will enable or disable GPGPU computing on the computer vision and deep learning libraries. On ARM devices this flag will be ignored when fixed-point (integer) math implementation exist for a well-defined function. For example, this function will be disabled for the bilinear scaling as we have a fixed-point SIMD accelerated implementation. Same for many deep learning parts as we’re using QINT8 quantized inference. |
|
type |
bool |
pattern |
true | false |
gpgpu_workload_balancing_enabled¶
A device contains a CPU and a GPU. Both can be used for math operations. This option allows using both units. On some devices the CPU is faster and on other it’s slower. When the application starts, the work (math operations to perform) is equally divided: 50% for the CPU and 50% for the GPU. Our code contains a profiler to determine which unit is faster and how fast (percentage) it is. The profiler will change how the work is divided based on the time each unit takes to complete. This is why this configuration entry is named “workload balancing”. |
|
type |
bool |
pattern |
true | false |
assets_folder¶
Path to the folder containing the configuration files and deep learning models. Default value is the current folder. |
|
type |
string |
pattern |
folder path |
format¶
Defines the MICR format to enable for the detection. Use “e13b” to look for E-13B lines only and “cmc7” for CMC-7 lines only. To look for both, use “e13b+cmc7”. For performance reasons you should not use “e13b+cmc7” unless you really expect the document to contain both E-13B and CMC7 lines. |
|
type |
string |
pattern |
e13b | cmc7 | e13b+cmc7 |
roi¶
Defines the Region Of Interest (ROI) for the detector. Any pixels outside region of interest will be ignored by the detector. Defining an WxH region of interest instead of resizing the image at WxH is very important as you’ll keep the same quality when you define a ROI while you’ll lose in quality when using the later. |
|
type |
float[4] |
pattern |
[left, right, top, bottom] |
segmenter_accuracy¶
Before calling the classifier to determine whether a zone contains a MICR line we need to segment the text using multi-layer segmenter followed by clustering. The multi-layer segmenter uses hysteresis for the voting process using a [min, max] double thresholding values. This configuration entry defines how low the thresholding values should be. Lower the values are, higher the number of fragments will be and higher the recall will be. High number of fragments means more data to process which means more CPU usage and higher processing time. |
|
type |
string |
pattern |
“veryhigh” | “high” | “medium” | “low” | “verylow” |
backpropagation_enabled¶
Whether to enable backpropagation to detect the MICR lines. Only CMC-7 font uses this option. Check the relevant section for more information about backpropagation. |
|
type |
boolean |
pattern |
true | false |
ielcd_enabled¶
Whether to enable Image Enhancement for Low Contrast Document (IELCD) feature. |
|
type |
boolean |
pattern |
true | false |
interpolation¶
Defines the interpolation method to use when pixels are scaled, deskewed or deslanted. bicubic offers the best quality but is slow as there is no SIMD or GPU acceleration yet. bilinear and nearest interpolations are multithreaded and SIMD accelerated. For most scenarios bilinear interpolation is good enough to provide high accuracy/precision results while the code still runs very fast. |
|
type |
string |
pattern |
“nearest” | “bilinear” | “bicubic” |
score_type¶
Defines the overall score type. The recognizer outputs a recognition score ([0.f, 1.f]) for every character in MICR line. The score type defines how to compute the overall score. |
|
type |
string |
pattern |
“min” | “mean” | “median” | “max” | “minmax” |
min_score¶
Defines a threshold for the recognition score/confidence. Any recognition with a score below that threshold will be ignored/removed. This value could be used to filter the false-positives and improve the precision. Low value will lead to high recall and low precision while a high value means the opposite. |
|
type |
int |
pattern |
[0.f, 1.f] |