get_deep_ocr_paramT_get_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param (Operator)

Name

get_deep_ocr_paramT_get_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param — Return the parameters of a Deep OCR model.

Signature

get_deep_ocr_param( : : DeepOcrHandle, GenParamName : GenParamValue)

Herror T_get_deep_ocr_param(const Htuple DeepOcrHandle, const Htuple GenParamName, Htuple* GenParamValue)

void GetDeepOcrParam(const HTuple& DeepOcrHandle, const HTuple& GenParamName, HTuple* GenParamValue)

HTuple HDlModelOcr::GetDeepOcrParam(const HString& GenParamName) const

HTuple HDlModelOcr::GetDeepOcrParam(const char* GenParamName) const

HTuple HDlModelOcr::GetDeepOcrParam(const wchar_t* GenParamName) const   (Windows only)

static void HOperatorSet.GetDeepOcrParam(HTuple deepOcrHandle, HTuple genParamName, out HTuple genParamValue)

HTuple HDlModelOcr.GetDeepOcrParam(string genParamName)

def get_deep_ocr_param(deep_ocr_handle: HHandle, gen_param_name: str) -> Sequence[HTupleElementType]

def get_deep_ocr_param_s(deep_ocr_handle: HHandle, gen_param_name: str) -> HTupleElementType

Description

get_deep_ocr_paramget_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param returns the parameter values GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value of GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name for the Deep OCR model DeepOcrHandleDeepOcrHandleDeepOcrHandleDeepOcrHandledeepOcrHandledeep_ocr_handle.

Parameters can apply to the whole model or be specific for a given component. The following table gives an overview, which parameters can be set and which ones retrieved as well as for which model part they apply.

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name Model Det. comp. Recog. comp.
'device'"device""device""device""device""device"
'detection_device'"detection_device""detection_device""detection_device""detection_device""detection_device"
'detection_image_dimensions'"detection_image_dimensions""detection_image_dimensions""detection_image_dimensions""detection_image_dimensions""detection_image_dimensions"
'detection_image_height'"detection_image_height""detection_image_height""detection_image_height""detection_image_height""detection_image_height"
'detection_image_width'"detection_image_width""detection_image_width""detection_image_width""detection_image_width""detection_image_width"
'detection_min_character_score'"detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score"
'detection_min_link_score'"detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score"
'detection_min_word_area'"detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area"
'detection_min_word_score'"detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score"
'detection_model'"detection_model""detection_model""detection_model""detection_model""detection_model"
'detection_orientation'"detection_orientation""detection_orientation""detection_orientation""detection_orientation""detection_orientation"
'detection_sort_by_line'"detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line"
'recognition_alphabet'"recognition_alphabet""recognition_alphabet""recognition_alphabet""recognition_alphabet""recognition_alphabet"
'recognition_device'"recognition_device""recognition_device""recognition_device""recognition_device""recognition_device"
'recognition_image_dimensions'"recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions"
'recognition_image_height'"recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height"
'recognition_image_width'"recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width"
'recognition_model'"recognition_model""recognition_model""recognition_model""recognition_model""recognition_model"
Thereby, the symbols and abbreviations denote the following :

In the following the parameters are described, sorted according to the part of the model they apply to:

Entire model:

'device'"device""device""device""device""device":

Handle of the device on which the model will be executed. To get a tuple of handles of all available potentially Deep-OCR-capable compute devices use query_available_dl_devicesquery_available_dl_devicesQueryAvailableDlDevicesQueryAvailableDlDevicesQueryAvailableDlDevicesquery_available_dl_devices.

Note, the device can be reset for an individual component, in which case only the possibly remaining part of the model (e.g., the remaining component) will be executed on the device of this handle.

Default: Handle of the default device, thus the GPU with index 0 when querying a list using get_systemget_systemGetSystemGetSystemGetSystemget_system with 'cuda_devices'"cuda_devices""cuda_devices""cuda_devices""cuda_devices""cuda_devices". If no device is available, this is an empty tuple.

Detection component:

'detection_device'"detection_device""detection_device""detection_device""detection_device""detection_device":

This parameter will set the device on which the detection component of the Deep OCR model is executed. For a further description, see 'device'"device""device""device""device""device".

Default: The same value as for 'device'"device""device""device""device""device".

'detection_image_dimensions'"detection_image_dimensions""detection_image_dimensions""detection_image_dimensions""detection_image_dimensions""detection_image_dimensions":

Tuple containing the image dimensions ('detection_image_width'"detection_image_width""detection_image_width""detection_image_width""detection_image_width""detection_image_width", 'detection_image_height'"detection_image_height""detection_image_height""detection_image_height""detection_image_height""detection_image_height", number of channels) the detection component will process.

Default: [1024, 1024, 3]

'detection_image_height'"detection_image_height""detection_image_height""detection_image_height""detection_image_height""detection_image_height":

Height of the images the detection component will process. This means, the network will first zoom the input image to this height before processing it. Thus this size can influence the results.

The model architecture requires that the height is a multiple of 32. If this is not the case, the height is rounded up to the nearest integer multiple of 32.

Typical values: 768, 1024, 1280

Default: 1024

'detection_image_width'"detection_image_width""detection_image_width""detection_image_width""detection_image_width""detection_image_width":

Width of the images the detection component will process. This means, the network will first zoom the input image to this width before processing it. Thus this size can influence the results.

The model architecture requires that the width is a multiple of 32. If this is not the case, the width is rounded up to the nearest integer multiple of 32.

Typical values: 768, 1024, 1280

Default: 1024

'detection_min_character_score'"detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score":

The parameter 'detection_min_character_score'"detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score" specifies the lower threshold used for the character score map to estimate the dimensions of the characters. By adjusting the parameter, suggested instances can be split up or neighboring instances can be merged.

Range: .

Default: 0.5

'detection_min_link_score'"detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score":

The parameter 'detection_min_link_score'"detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score" defines the minimum link score required between two localized characters to recognize these characters as coherent word.

Range: .

Default: 0.3

'detection_min_word_area'"detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area":

The parameter 'detection_min_word_area'"detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area" defines the minimum size that a localized word must have in order to be suggested. This parameter can be used to filter suggestions that are too small.

Range: .

Default: 10.

'detection_min_word_score'"detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score":

The parameter 'detection_min_word_score'"detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score" defines the minimum score a localized instance must contain to be suggested as valid word. With this parameter uncertain words can be filtered out.

Range: .

Default: 0.7

'detection_model'"detection_model""detection_model""detection_model""detection_model""detection_model":

Handle of the Deep OCR model component for word detection.

'detection_orientation'"detection_orientation""detection_orientation""detection_orientation""detection_orientation""detection_orientation":

This parameter allows to set a predefined orientation angle for the word detection. To revert to default behavior using the internal orientation estimation, 'detection_orientation'"detection_orientation""detection_orientation""detection_orientation""detection_orientation""detection_orientation" is set to 'auto'"auto""auto""auto""auto""auto".

Range: .

Default: 'auto'"auto""auto""auto""auto""auto"

'detection_sort_by_line'"detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line":

The words are sorted line-wise based on the orientation of the localized word instances. If a sorting in row and column direction is preferred, the parameter 'detection_sort_by_line'"detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line" has to be set to 'false'"false""false""false""false""false".

Default: 'true'"true""true""true""true""true"

Recognition component:

'recognition_alphabet'"recognition_alphabet""recognition_alphabet""recognition_alphabet""recognition_alphabet""recognition_alphabet":

The character set with which the Deep OCR model has been trained, thus the characters the model can recognize.

'recognition_device'"recognition_device""recognition_device""recognition_device""recognition_device""recognition_device":

This parameter will set the device on which the recognition component of the Deep OCR model is executed. For a further description, see 'device'"device""device""device""device""device".

Default: The same value as for 'device'"device""device""device""device""device".

'recognition_image_dimensions'"recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions":

Tuple containing the image dimensions ('recognition_image_width'"recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width", 'recognition_image_height'"recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height", number of channels) the recognition component will process.

Default: [100, 32, 1]

'recognition_image_height'"recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height":

Height of the images the recognition component will process. This means, the network will first zoom the input image part to this height before processing it.

Default: 32

'recognition_image_width'"recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width":

Width of the images the recognition component will process. This means, the network will first zoom the input image part to this width before processing it.

Default: 100

'recognition_model'"recognition_model""recognition_model""recognition_model""recognition_model""recognition_model":

Handle of the Deep OCR model component for word recognition.

Execution Information

Parameters

DeepOcrHandleDeepOcrHandleDeepOcrHandleDeepOcrHandledeepOcrHandledeep_ocr_handle (input_control)  deep_ocr HDlModelOcr, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the Deep OCR model.

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the generic parameter.

Default value: 'recognition_model' "recognition_model" "recognition_model" "recognition_model" "recognition_model" "recognition_model"

List of values: 'detection_device'"detection_device""detection_device""detection_device""detection_device""detection_device", 'detection_image_dimensions'"detection_image_dimensions""detection_image_dimensions""detection_image_dimensions""detection_image_dimensions""detection_image_dimensions", 'detection_image_height'"detection_image_height""detection_image_height""detection_image_height""detection_image_height""detection_image_height", 'detection_image_width'"detection_image_width""detection_image_width""detection_image_width""detection_image_width""detection_image_width", 'detection_min_character_score'"detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score""detection_min_character_score", 'detection_min_link_score'"detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score""detection_min_link_score", 'detection_min_word_area'"detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area""detection_min_word_area", 'detection_min_word_score'"detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score""detection_min_word_score", 'detection_model'"detection_model""detection_model""detection_model""detection_model""detection_model", 'detection_orientation'"detection_orientation""detection_orientation""detection_orientation""detection_orientation""detection_orientation", 'detection_sort_by_line'"detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line""detection_sort_by_line", 'recognition_alphabet'"recognition_alphabet""recognition_alphabet""recognition_alphabet""recognition_alphabet""recognition_alphabet", 'recognition_device'"recognition_device""recognition_device""recognition_device""recognition_device""recognition_device", 'recognition_image_dimensions'"recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions""recognition_image_dimensions", 'recognition_image_height'"recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height""recognition_image_height", 'recognition_image_width'"recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width""recognition_image_width", 'recognition_model'"recognition_model""recognition_model""recognition_model""recognition_model""recognition_model"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (output_control)  attribute.value(-array) HTupleSequence[HTupleElementType]HTupleHtuple (integer / handle / string / real) (int / long / HHandle / string / double) (Hlong / HHandle / HString / double) (Hlong / handle / char* / double)

Value of the generic parameter.

Result

If the parameters are valid, the operator get_deep_ocr_paramget_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param returns the value TRUE. If necessary, an exception is raised.

Possible Predecessors

create_deep_ocrcreate_deep_ocrCreateDeepOcrCreateDeepOcrCreateDeepOcrcreate_deep_ocr, set_deep_ocr_paramset_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamSetDeepOcrParamset_deep_ocr_param

Possible Successors

set_deep_ocr_paramset_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamSetDeepOcrParamset_deep_ocr_param

See also

set_deep_ocr_paramset_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamSetDeepOcrParamset_deep_ocr_param

Module

OCR/OCV