Skip to content

set_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamset_deep_ocr_paramT_set_deep_ocr_param๐Ÿ”—

Short description๐Ÿ”—

set_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamset_deep_ocr_paramT_set_deep_ocr_param โ€” Set the parameters of a Deep OCR model.

Signature๐Ÿ”—

set_deep_ocr_param( deep_ocr DeepOcrHandle, attribute.name GenParamName, attribute.value GenParamValue )void SetDeepOcrParam( const HTuple& DeepOcrHandle, const HTuple& GenParamName, const HTuple& GenParamValue )static void HOperatorSet.SetDeepOcrParam( HTuple deepOcrHandle, HTuple genParamName, HTuple genParamValue )def set_deep_ocr_param( deep_ocr_handle: HHandle, gen_param_name: str, gen_param_value: HTupleType ) -> None

Herror T_set_deep_ocr_param( const Htuple DeepOcrHandle, const Htuple GenParamName, const Htuple GenParamValue )

void HDlModelOcr::SetDeepOcrParam( const HString& GenParamName, const HTuple& GenParamValue ) const

void HDlModelOcr::SetDeepOcrParam( const HString& GenParamName, double GenParamValue ) const

void HDlModelOcr::SetDeepOcrParam( const char* GenParamName, double GenParamValue ) const

void HDlModelOcr::SetDeepOcrParam( const wchar_t* GenParamName, double GenParamValue ) const (Windows only)

void HDlModelOcr.SetDeepOcrParam( string genParamName, HTuple genParamValue )

void HDlModelOcr.SetDeepOcrParam( string genParamName, double genParamValue )

Description๐Ÿ”—

set_deep_ocr_paramSetDeepOcrParam sets the parameters GenParamNamegenParamNamegen_param_name of the Deep OCR model DeepOcrHandledeepOcrHandledeep_ocr_handle to the values GenParamValuegenParamValuegen_param_value.

The possible parameters are listed and described in get_deep_ocr_paramGetDeepOcrParam. An overview of the Deep OCR workflow is given in OCR / Deep OCR.

Attention๐Ÿ”—

System requirements: To successfully set 'gpu'"gpu" parameters, cuDNN and cuBLAS are required, i.e., to set the parameter GenParamNamegenParamNamegen_param_name 'device'"device" to a GPU. For further details, please refer to the โ€œInstallation Guideโ€, paragraph โ€œRequirements for Deep Learning and Deep-Learning-Based Methodsโ€.

Execution information๐Ÿ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters๐Ÿ”—

DeepOcrHandledeepOcrHandledeep_ocr_handle (input_control) deep_ocr โ†’ (handle)HTuple (HHandle)HDlModelOcr, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the Deep OCR model.

GenParamNamegenParamNamegen_param_name (input_control) attribute.name โ†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the generic parameter.

Default: 'detection_image_width'"detection_image_width"
List of values: 'detection_device', 'detection_image_height', 'detection_image_size', 'detection_image_width', 'detection_min_character_score', 'detection_min_link_score', 'detection_min_word_area', 'detection_min_word_score', 'detection_model', 'detection_optimize_for_inference', 'detection_orientation', 'detection_sort_by_line', 'detection_tiling', 'detection_tiling_overlap', 'device', 'recognition_alignment', 'recognition_alphabet', 'recognition_alphabet_internal', 'recognition_alphabet_mapping', 'recognition_batch_size', 'recognition_device', 'recognition_image_width', 'recognition_model', 'recognition_num_char_candidates', 'recognition_optimize_for_inference'"detection_device", "detection_image_height", "detection_image_size", "detection_image_width", "detection_min_character_score", "detection_min_link_score", "detection_min_word_area", "detection_min_word_score", "detection_model", "detection_optimize_for_inference", "detection_orientation", "detection_sort_by_line", "detection_tiling", "detection_tiling_overlap", "device", "recognition_alignment", "recognition_alphabet", "recognition_alphabet_internal", "recognition_alphabet_mapping", "recognition_batch_size", "recognition_device", "recognition_image_width", "recognition_model", "recognition_num_char_candidates", "recognition_optimize_for_inference"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value(-array) โ†’ (real / string / integer / handle)HTuple (double / HString / Hlong / HHandle)HTuple (double / string / int / long / HHandle)HTupleTypeHtuple (double / char* / Hlong / handle)

Value of the generic parameter.

Default: 10241024
Suggested values: 0, 10, 50, 100, 200, 512, 768, 1024, 1280, 0.3, 0.4, 0.5, 0.6, 0.7, 'true', 'false', 'auto', 'compact', 'default', 'pretrained_deep_ocr_detection.hdl', 'pretrained_deep_ocr_detection_compact.hdl', 'pretrained_deep_ocr_recognition.hdl', 'pretrained_deep_ocr_recognition_compact.hdl'0, 10, 50, 100, 200, 512, 768, 1024, 1280, 0.3, 0.4, 0.5, 0.6, 0.7, "true", "false", "auto", "compact", "default", "pretrained_deep_ocr_detection.hdl", "pretrained_deep_ocr_detection_compact.hdl", "pretrained_deep_ocr_recognition.hdl", "pretrained_deep_ocr_recognition_compact.hdl"

Result๐Ÿ”—

If the parameters are valid, the operator set_deep_ocr_paramSetDeepOcrParam returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators๐Ÿ”—

Combinations

Possible predecessors

create_deep_ocrCreateDeepOcr, get_deep_ocr_paramGetDeepOcrParam

Possible successors

get_deep_ocr_paramGetDeepOcrParam, apply_deep_ocrApplyDeepOcr

See also

get_deep_ocr_paramGetDeepOcrParam

Module๐Ÿ”—

OCR/OCV