Open Harryoung opened 10 months ago
#
如果ppocr_keys_v1.txt字典里面不包含的字,比如“纡”,想要识别的话,需要按照以下步骤进行操作:
创建一个自定义字典文件,例如custom_dict.txt
,并将需要识别的字符逐行添加到文件中。在这种情况下,您可以将“纡”添加到custom_dict.txt
中。
在配置文件中修改character_dict_path
参数,将其指向您创建的自定义字典文件路径。例如,将character_dict_path
设置为ppocr/utils/dict/custom_dict.txt
。
确保在配置文件中启用了识别空格的选项。您可以将use_space_char
设置为True
,以便模型能够识别空格字符。
通过以上步骤,您可以使用自定义字典来识别字典中不存在的字符,如“纡”。
https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/applications/光功率计数码管字符识别/光功率计数码管字符识别.md, https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/deploy/lite/readme.md, https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/recognition.md
My answer may not be accurate. I suggest you refer to relevant sources to make a comprehensive judgment. To invoke me for more questions, add a comment using following command: @llm-issue-bot \<QUESTION>
我们提供了issue bot来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide issue bot to solve issues, do you want it? (Please write yes/no):yes
请在这里描述你的问题/Please describe your issue here: 请问如果ppocr_keys_v1.txt字典里面不包含的字,比如“纡”,想要识别的话,需要怎么做