set_deep_ocr_paramT_set_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamset_deep_ocr_param设置深度光学字符识别参数(算子)

名称

set_deep_ocr_paramT_set_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamset_deep_ocr_param — 设置深度 OCR 模型的参数。

签名

set_deep_ocr_param( : : DeepOcrHandle, GenParamName, GenParamValue : )

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

void SetDeepOcrParam(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)

static void HOperatorSet.SetDeepOcrParam(HTuple deepOcrHandle, HTuple genParamName, HTuple genParamValue)

void HDlModelOcr.SetDeepOcrParam(string genParamName, HTuple genParamValue)

void HDlModelOcr.SetDeepOcrParam(string genParamName, double genParamValue)

def set_deep_ocr_param(deep_ocr_handle: HHandle, gen_param_name: str, gen_param_value: HTupleType) -> None

描述

set_deep_ocr_paramset_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamSetDeepOcrParamset_deep_ocr_param 将深度 OCR 模型 DeepOcrHandleDeepOcrHandleDeepOcrHandleDeepOcrHandledeepOcrHandledeep_ocr_handle 的参数 GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name 设置为值 GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value

可能的参数已在 get_deep_ocr_paramget_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param 中列出并描述。深度 OCR 工作流程的概述详见 OCR / 深度 OCR

注意

系统要求:要成功设置 'gpu'"gpu""gpu""gpu""gpu""gpu" 参数,需要安装 cuDNN 和 cuBLAS,即需将参数 GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name 'device'"device""device""device""device""device" 设置为 GPU 设备。更多详细信息,请参阅 “安装指南” 中的“深度学习及基于深度学习方法的要求”一章。

执行信息

参数

DeepOcrHandleDeepOcrHandleDeepOcrHandleDeepOcrHandledeepOcrHandledeep_ocr_handle (输入控制)  deep_ocr HDlModelOcr, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

深度 OCR 模型的句柄。

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制)  attribute.name HTuplestrHTupleHtuple (string) (string) (HString) (char*)

通用参数的名称。

默认值: 'detection_image_width' "detection_image_width" "detection_image_width" "detection_image_width" "detection_image_width" "detection_image_width"

值列表: 'detection_device'"detection_device""detection_device""detection_device""detection_device""detection_device", 'detection_image_height'"detection_image_height""detection_image_height""detection_image_height""detection_image_height""detection_image_height", 'detection_image_size'"detection_image_size""detection_image_size""detection_image_size""detection_image_size""detection_image_size", '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", 'detection_tiling'"detection_tiling""detection_tiling""detection_tiling""detection_tiling""detection_tiling", 'detection_tiling_overlap'"detection_tiling_overlap""detection_tiling_overlap""detection_tiling_overlap""detection_tiling_overlap""detection_tiling_overlap", 'device'"device""device""device""device""device", 'recognition_alphabet_internal'"recognition_alphabet_internal""recognition_alphabet_internal""recognition_alphabet_internal""recognition_alphabet_internal""recognition_alphabet_internal", 'recognition_alphabet_mapping'"recognition_alphabet_mapping""recognition_alphabet_mapping""recognition_alphabet_mapping""recognition_alphabet_mapping""recognition_alphabet_mapping", 'recognition_batch_size'"recognition_batch_size""recognition_batch_size""recognition_batch_size""recognition_batch_size""recognition_batch_size", 'recognition_device'"recognition_device""recognition_device""recognition_device""recognition_device""recognition_device", '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", 'recognition_num_char_candidates'"recognition_num_char_candidates""recognition_num_char_candidates""recognition_num_char_candidates""recognition_num_char_candidates""recognition_num_char_candidates"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输入控制)  attribute.value(-array) HTupleHTupleTypeHTupleHtuple (real / string / integer / handle) (double / string / int / long / HHandle) (double / HString / Hlong / HHandle) (double / char* / Hlong / handle)

通用参数的值。

默认值: 1024

建议值: 0, 10, 50, 100, 200, 512, 768, 1024, 1280, 0.3, 0.4, 0.5, 0.6, 0.7, 'true'"true""true""true""true""true", 'false'"false""false""false""false""false", 'auto'"auto""auto""auto""auto""auto", 'compact'"compact""compact""compact""compact""compact", 'default'"default""default""default""default""default", 'pretrained_deep_ocr_detection.hdl'"pretrained_deep_ocr_detection.hdl""pretrained_deep_ocr_detection.hdl""pretrained_deep_ocr_detection.hdl""pretrained_deep_ocr_detection.hdl""pretrained_deep_ocr_detection.hdl", 'pretrained_deep_ocr_detection_compact.hdl'"pretrained_deep_ocr_detection_compact.hdl""pretrained_deep_ocr_detection_compact.hdl""pretrained_deep_ocr_detection_compact.hdl""pretrained_deep_ocr_detection_compact.hdl""pretrained_deep_ocr_detection_compact.hdl", 'pretrained_deep_ocr_recognition.hdl'"pretrained_deep_ocr_recognition.hdl""pretrained_deep_ocr_recognition.hdl""pretrained_deep_ocr_recognition.hdl""pretrained_deep_ocr_recognition.hdl""pretrained_deep_ocr_recognition.hdl"

结果

如果参数有效,算子 set_deep_ocr_paramset_deep_ocr_paramSetDeepOcrParamSetDeepOcrParamSetDeepOcrParamset_deep_ocr_param 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

create_deep_ocrcreate_deep_ocrCreateDeepOcrCreateDeepOcrCreateDeepOcrcreate_deep_ocr, get_deep_ocr_paramget_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param

可能的后继

get_deep_ocr_paramget_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param, apply_deep_ocrapply_deep_ocrApplyDeepOcrApplyDeepOcrApplyDeepOcrapply_deep_ocr

另见

get_deep_ocr_paramget_deep_ocr_paramGetDeepOcrParamGetDeepOcrParamGetDeepOcrParamget_deep_ocr_param

模块

光学字符识别/光学字符验证