diff --git a/doc/doc_ch/style_text_rec.md b/doc/doc_ch/style_text_rec.md index d84c8d09282f4b11956ef9faf1c9d7a73674c07f..dba181ead63a5744b28988ec9ce8d1e7902c38f2 100644 --- a/doc/doc_ch/style_text_rec.md +++ b/doc/doc_ch/style_text_rec.md @@ -76,7 +76,7 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_ 首先,需要风格图片作为合成图片的参考依据,这些数据可以是用作训练OCR识别模型的数据集。本例中使用带有标注文件的数据集作为风格图片. 1. 在`configs/dataset_config.yml`中配置输入数据路径。 - * `StyleSamplerl`: + * `StyleSampler`: * `method`:使用的风格图片采样方法; * `image_home`:风格图片目录; * `label_file`:风格图片路径列表文件,如果所用数据集有label,则label_file为label文件路径; diff --git a/style_text_rec/tools/synth_image.py b/style_text_rec/tools/synth_image.py index 7c0124b347ac71fd9ea447d192fce19174e23d0a..7b4827b825e4a28dd1fb2eba722d23e64e8ce0be 100644 --- a/style_text_rec/tools/synth_image.py +++ b/style_text_rec/tools/synth_image.py @@ -15,8 +15,8 @@ import os import cv2 import sys import glob -from argparse import ArgumentParser, RawDescriptionHelpFormatter +from utils.config import ArgsParser from engine.synthesisers import ImageSynthesiser __dir__ = os.path.dirname(os.path.abspath(__file__)) diff --git a/style_text_rec/utils/config.py b/style_text_rec/utils/config.py index b2f8a618a838db361da4867e00df8dcd619f9f3d..b515bb98e41c6ba80ff2242e21afa0d4058843a9 100644 --- a/style_text_rec/utils/config.py +++ b/style_text_rec/utils/config.py @@ -13,7 +13,7 @@ # limitations under the License. import yaml import os -from argparse import ArgumentParser, RawDescriptionHelpFormatter +from utils.argparse import ArgumentParser, RawDescriptionHelpFormatter def override(dl, ks, v):