From 25ec8cacedfd564d93a56cac46ad320be8ee2e79 Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Sat, 12 Dec 2020 11:30:49 +0800 Subject: [PATCH] update inference --- doc/doc_ch/inference.md | 4 ++-- doc/doc_en/inference_en.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/doc_ch/inference.md b/doc/doc_ch/inference.md index 8f4bea07..7fc5e1bf 100644 --- a/doc/doc_ch/inference.md +++ b/doc/doc_ch/inference.md @@ -295,10 +295,10 @@ dict_character = list(self.character_str) ``` ### 4. 自定义文本识别字典的推理 -如果训练时修改了文本的字典,在使用inference模型预测时,需要通过`--rec_char_dict_path`指定使用的字典路径 +如果训练时修改了文本的字典,在使用inference模型预测时,需要通过`--rec_char_dict_path`指定使用的字典路径,并且设置 `rec_char_type=ch` ``` -python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./your inference model" --rec_image_shape="3, 32, 100" --rec_char_type="en" --rec_char_dict_path="your text dict path" +python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./your inference model" --rec_image_shape="3, 32, 100" --rec_char_type="ch" --rec_char_dict_path="your text dict path" ``` diff --git a/doc/doc_en/inference_en.md b/doc/doc_en/inference_en.md index ee567451..12553c4c 100644 --- a/doc/doc_en/inference_en.md +++ b/doc/doc_en/inference_en.md @@ -299,10 +299,10 @@ dict_character = list(self.character_str) ### 4. TEXT RECOGNITION MODEL INFERENCE USING CUSTOM CHARACTERS DICTIONARY -If the chars dictionary is modified during training, you need to specify the new dictionary path by setting the parameter `rec_char_dict_path` when using your inference model to predict. +If the text dictionary is modified during training, when using the inference model to predict, you need to specify the dictionary path used by `--rec_char_dict_path`, and set `rec_char_type=ch` ``` -python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./your inference model" --rec_image_shape="3, 32, 100" --rec_char_type="en" --rec_char_dict_path="your text dict path" +python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./your inference model" --rec_image_shape="3, 32, 100" --rec_char_type="ch" --rec_char_dict_path="your text dict path" ``` -- GitLab