Configuration options¶
The configuration options are provided when the engine is initialized and they are case-sensitive.
Sample (default) config:
{
"debug_level": "info",
"debug_write_input_image_enabled": false,
"debug_internal_data_path": ".",
"assets_folder": "../../../assets",
"gpu_ctrl_memory_enabled": false,
"num_threads": -1,
"max_latency": -1,
"max_batchsize": -1,
"asm_enabled": true,
"intrin_enabled": true,
"openvino_activation": "auto",
"openvino_device": "CPU",
"graph_type": "dense",
"graph_2passes_enabled": true,
"graph_2ndpass_ocr_threshold": 0.9,
"graph_2ndpass_umeyama_enabled": true,
"ocr_2passes": true,
"ocr_2ndpass_threshold": 0.9,
"ocr_patch_antialias": true,
"ocr_tunning_apply_patterns": true,
"ocr_tunning_apply_whitelist": true,
"ocr_tunning_apply_blacklist": true,
"magsac_sigma": 1.0,
"magsac_max_iters": 5000,
"magsac_resampler": "uniform",
"tps_enabled": true,
"tps_speed": 1,
"tps_cost": "l2",
"stn_enabled": true,
"detect_threshold": 0.3,
"text_segmentation_type": "watershed"
}
assets_folder¶
Path to the folder containing the configuration files and deep learning models. |
|
type |
string |
pattern |
folder path |
default |
“” |
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” |
default |
“info” |
debug_write_input_image_enabled¶
Whether to write the transformed input image to the disk. |
|
type |
bool |
pattern |
true | false |
default |
False |
debug_internal_data_path¶
Path to the folder where to write the transformed input image. |
|
type |
string |
pattern |
folder path |
default |
“” |
license_token_file¶
Path to the file containing the license token. |
|
type |
string |
pattern |
file path |
default |
“” |
license_token_data¶
Base64 string representing the license token. |
|
type |
string |
pattern |
base64 |
default |
“” |
gpu_ctrl_memory_enabled¶
Whether to control the GPU memory usage. |
|
type |
bool |
pattern |
true | false |
default |
false |
num_threads¶
Defines the maximum number of threads to use. You should not change this value unless you know what you’re doing. |
|
type |
int |
pattern |
[-1, +inf[ |
default |
-1 |
max_batchsize¶
Defines the maximum batch size to use for the inference. |
|
type |
int |
pattern |
[-1, +inf[ |
default |
-1 |
max_latency¶
The parallel processing method could introduce delay/latency in the delivery callback on low-end CPUs. |
|
type |
int |
pattern |
[0, +inf[ |
default |
-1 |
asm_enabled¶
Whether to enable assembler code to use SIMD acceleration (SSE, AVX, NEON). |
|
type |
bool |
pattern |
true | false |
default |
true |
intrin_enabled¶
Whether to enable intrinsic code to use SIMD acceleration (SSE, AVX, NEON). |
|
type |
bool |
pattern |
true | false |
default |
true |
openvino_activation¶
Defines the OpenVINO activation mode. “auto” means the activation will be based on whether GPU acceleration is possible or not. |
|
type |
string |
pattern |
“auto” | “on” | “off” |
default |
“auto” |
openvino_device¶
OpenVINO device to use for computations. We recommend using “CPU” which is always correct. |
|
type |
string |
pattern |
“GNA” | “HETERO” | “CPU” | “MULTI” | “GPU” | “MYRIAD” | “HDDL ” | “FPGA” |
default |
“CPU” |
graph_type¶
Defines the graph type. “dense” graphs are more accurate but slower. |
|
type |
string |
pattern |
“sparse” | “dense” |
default |
“dense” |
graph_2passes_enabled¶
Whether to enable 2-pass graph computation. |
|
type |
bool |
pattern |
true | false |
default |
True |
graph_2ndpass_ocr_threshold¶
Threshold value to perform 2nd-pass graph computation. |
|
type |
float |
pattern |
[0, 1] |
default |
0.9 |
graph_2ndpass_umeyama_enabled¶
Whether to run Umeyama algorithm during the 2nd-pass graph computation. |
|
type |
bool |
pattern |
true | false |
default |
True |
ocr_2passes¶
Whether to run 2-pass OCR. |
|
type |
bool |
pattern |
true | false |
default |
True |
ocr_2ndpass_threshold¶
Threshold value to perform 2nd-pass OCR. |
|
type |
float |
pattern |
[0, 1] |
default |
0.9 |
ocr_patch_antialias¶
Whether to enable anti-aliasing on the each field before OCR. |
|
type |
bool |
pattern |
true | false |
default |
True |
ocr_tunning_apply_patterns¶
Whether to apply pattern matching on the OCR candidate results. |
|
type |
bool |
pattern |
true | false |
default |
True |
ocr_tunning_apply_whitelist¶
Whether to apply white-listing on the OCR candidate results. |
|
type |
bool |
pattern |
true | false |
default |
True |
ocr_tunning_apply_blacklist¶
Whether to apply black-listing on the OCR candidate results. |
|
type |
bool |
pattern |
true | false |
default |
True |
magsac_sigma¶
Defines MAGSAC++ (Marginalizing Sample Consensus) sigma value. |
|
type |
float |
pattern |
]-inf, +inf[ |
default |
1.0 |
magsac_max_iters¶
Defines maximum number of iterations for MAGSAC++ (Marginalizing Sample Consensus). |
|
type |
int |
pattern |
[1, +inf[ |
default |
5000 |
magsac_resampler¶
Defines the resampler to use for MAGSAC++ (Marginalizing Sample Consensus). |
|
type |
string |
pattern |
“uniform” | “pnapsac”| “napsac” | “prosac” |
default |
“uniform” |
tps_enabled¶
Whether to enable TPS (Thin Plate Spline). |
|
type |
bool |
pattern |
true | false |
default |
True |
tps_speed¶
Defines TPS speed. |
|
type |
int |
pattern |
[1, 5] |
default |
1 |
tps_cost¶
Defines the cost function to measure TPS error for each epoch. “l2” stands for Euclidean distance while “kc” stands for Kernel Correlation. |
|
type |
string |
pattern |
“l2” | “kc” |
default |
“l2” |
stn_enabled¶
Whether to enable STN (Spatial Transformer Network). |
|
type |
bool |
pattern |
true | false |
default |
True |
detect_threshold¶
Defines document (passport, id card, driver license…) detection threshold. |
|
type |
float |
pattern |
[0, 1] |
default |
0.3 |
text_segmentation_type¶
Defines the algorithm to use for text segmentation. |
|
type |
string |
pattern |
“watershed” | “tmms” | “watershed+tmms” | “tmms+watershed” |
default |
“watershed” |