From 25bf92295f93014ad8929589e15cd7ca20170a8d Mon Sep 17 00:00:00 2001 From: Wei Shengyu Date: Wed, 27 Jan 2021 19:04:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0language=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E7=9A=84=E8=AF=B4=E6=98=8E=20(#1810)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update README.md * Update README_ch.md * Update README.md --- StyleText/README.md | 4 ++-- StyleText/README_ch.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/StyleText/README.md b/StyleText/README.md index df4fbf3c..65a72ac8 100644 --- a/StyleText/README.md +++ b/StyleText/README.md @@ -72,7 +72,7 @@ fusion_generator: python3 tools/synth_image.py -c configs/config.yml --style_image examples/style_images/2.jpg --text_corpus PaddleOCR --language en ``` -* Note 1: The language options is correspond to the corpus. Currently, the tool only supports English, Simplified Chinese and Korean. +* Note 1: The language options is correspond to the corpus. Currently, the tool only supports English(en), Simplified Chinese(ch) and Korean(ko). * Note 2: Synth-Text is mainly used to generate images for OCR recognition models. So the height of style images should be around 32 pixels. Images in other sizes may behave poorly. * Note 3: You can modify `use_gpu` in `configs/config.yml` to determine whether to use GPU for prediction. @@ -120,7 +120,7 @@ In actual application scenarios, it is often necessary to synthesize pictures in * `with_label`:Whether the `label_file` is label file list. * `CorpusGenerator`: * `method`:Method of CorpusGenerator,supports `FileCorpus` and `EnNumCorpus`. If `EnNumCorpus` is used,No other configuration is needed,otherwise you need to set `corpus_file` and `language`. - * `language`:Language of the corpus. + * `language`:Language of the corpus. Currently, the tool only supports English(en), Simplified Chinese(ch) and Korean(ko). * `corpus_file`: Filepath of the corpus. Corpus file should be a text file which will be split by line-endings('\n'). Corpus generator samples one line each time. diff --git a/StyleText/README_ch.md b/StyleText/README_ch.md index fd259ca0..ccd1efaf 100644 --- a/StyleText/README_ch.md +++ b/StyleText/README_ch.md @@ -63,10 +63,10 @@ fusion_generator: ```python python3 tools/synth_image.py -c configs/config.yml --style_image examples/style_images/2.jpg --text_corpus PaddleOCR --language en ``` -* 注1:语言选项和语料相对应,目前该工具只支持英文、简体中文和韩语。 +* 注1:语言选项和语料相对应,目前支持英文(en)、简体中文(ch)和韩语(ko)。 * 注2:Style-Text生成的数据主要应用于OCR识别场景。基于当前PaddleOCR识别模型的设计,我们主要支持高度在32左右的风格图像。 如果输入图像尺寸相差过多,效果可能不佳。 -* 注3:可以通过修改配置文件中的`use_gpu`(true或者false)参数来决定是否使用GPU进行预测。 +* 注3:可以通过修改配置文件`configs/config.yml`中的`use_gpu`(true或者false)参数来决定是否使用GPU进行预测。 例如,输入如下图片和语料"PaddleOCR": @@ -105,7 +105,7 @@ python3 tools/synth_image.py -c configs/config.yml --style_image examples/style_ * `with_label`:标志`label_file`是否为label文件。 * `CorpusGenerator`: * `method`:语料生成方法,目前有`FileCorpus`和`EnNumCorpus`可选。如果使用`EnNumCorpus`,则不需要填写其他配置,否则需要修改`corpus_file`和`language`; - * `language`:语料的语种; + * `language`:语料的语种,目前支持英文(en)、简体中文(ch)和韩语(ko); * `corpus_file`: 语料文件路径。语料文件应使用文本文件。语料生成器首先会将语料按行切分,之后每次随机选取一行。 语料文件格式示例: -- GitLab