From 22ac6bc529f9e1423674a70bd00cec92ae88c042 Mon Sep 17 00:00:00 2001 From: weishengyu Date: Tue, 15 Dec 2020 21:53:06 +0800 Subject: [PATCH] rename files --- .../style_text_rec_en.md => StyleTextRec/README.md | 2 +- .../style_text_rec.md => StyleTextRec/README_ch.md | 10 +++++----- {style_text_rec => StyleTextRec}/__init__.py | 0 {style_text_rec => StyleTextRec}/arch/__init__.py | 0 .../arch/base_module.py | 0 {style_text_rec => StyleTextRec}/arch/decoder.py | 0 {style_text_rec => StyleTextRec}/arch/encoder.py | 0 .../arch/spectral_norm.py | 0 .../arch/style_text_rec.py | 0 {style_text_rec => StyleTextRec}/configs/config.yml | 0 .../configs/dataset_config.yml | 0 .../doc/images}/1.png | Bin .../doc/images}/2.png | Bin .../doc/images}/3.png | Bin .../doc/images}/4.jpg | Bin .../doc/images}/5.png | Bin {style_text_rec => StyleTextRec}/engine/__init__.py | 0 .../engine/corpus_generators.py | 0 .../engine/predictors.py | 0 .../engine/style_samplers.py | 0 .../engine/synthesisers.py | 0 .../engine/text_drawers.py | 0 {style_text_rec => StyleTextRec}/engine/writers.py | 0 .../examples/corpus/example.txt | 0 .../examples/image_list.txt | 0 .../examples/style_images/1.jpg | Bin .../examples/style_images/2.jpg | Bin .../fonts/ch_standard.ttf | Bin .../fonts/en_standard.ttf | Bin .../fonts/ko_standard.ttf | Bin {style_text_rec => StyleTextRec}/tools/__init__.py | 0 .../tools/synth_dataset.py | 0 .../tools/synth_image.py | 0 {style_text_rec => StyleTextRec}/utils/__init__.py | 0 {style_text_rec => StyleTextRec}/utils/config.py | 0 .../utils/load_params.py | 0 {style_text_rec => StyleTextRec}/utils/logging.py | 0 .../utils/math_functions.py | 0 {style_text_rec => StyleTextRec}/utils/sys_funcs.py | 0 39 files changed, 6 insertions(+), 6 deletions(-) rename doc/doc_en/style_text_rec_en.md => StyleTextRec/README.md (96%) rename doc/doc_ch/style_text_rec.md => StyleTextRec/README_ch.md (93%) rename {style_text_rec => StyleTextRec}/__init__.py (100%) rename {style_text_rec => StyleTextRec}/arch/__init__.py (100%) rename {style_text_rec => StyleTextRec}/arch/base_module.py (100%) rename {style_text_rec => StyleTextRec}/arch/decoder.py (100%) rename {style_text_rec => StyleTextRec}/arch/encoder.py (100%) rename {style_text_rec => StyleTextRec}/arch/spectral_norm.py (100%) rename {style_text_rec => StyleTextRec}/arch/style_text_rec.py (100%) rename {style_text_rec => StyleTextRec}/configs/config.yml (100%) rename {style_text_rec => StyleTextRec}/configs/dataset_config.yml (100%) rename {doc/imgs_style_text => StyleTextRec/doc/images}/1.png (100%) rename {doc/imgs_style_text => StyleTextRec/doc/images}/2.png (100%) rename {doc/imgs_style_text => StyleTextRec/doc/images}/3.png (100%) rename {doc/imgs_style_text => StyleTextRec/doc/images}/4.jpg (100%) rename {doc/imgs_style_text => StyleTextRec/doc/images}/5.png (100%) rename {style_text_rec => StyleTextRec}/engine/__init__.py (100%) rename {style_text_rec => StyleTextRec}/engine/corpus_generators.py (100%) rename {style_text_rec => StyleTextRec}/engine/predictors.py (100%) rename {style_text_rec => StyleTextRec}/engine/style_samplers.py (100%) rename {style_text_rec => StyleTextRec}/engine/synthesisers.py (100%) rename {style_text_rec => StyleTextRec}/engine/text_drawers.py (100%) rename {style_text_rec => StyleTextRec}/engine/writers.py (100%) rename {style_text_rec => StyleTextRec}/examples/corpus/example.txt (100%) rename {style_text_rec => StyleTextRec}/examples/image_list.txt (100%) rename {style_text_rec => StyleTextRec}/examples/style_images/1.jpg (100%) rename {style_text_rec => StyleTextRec}/examples/style_images/2.jpg (100%) rename {style_text_rec => StyleTextRec}/fonts/ch_standard.ttf (100%) rename {style_text_rec => StyleTextRec}/fonts/en_standard.ttf (100%) rename {style_text_rec => StyleTextRec}/fonts/ko_standard.ttf (100%) rename {style_text_rec => StyleTextRec}/tools/__init__.py (100%) rename {style_text_rec => StyleTextRec}/tools/synth_dataset.py (100%) rename {style_text_rec => StyleTextRec}/tools/synth_image.py (100%) rename {style_text_rec => StyleTextRec}/utils/__init__.py (100%) rename {style_text_rec => StyleTextRec}/utils/config.py (100%) rename {style_text_rec => StyleTextRec}/utils/load_params.py (100%) rename {style_text_rec => StyleTextRec}/utils/logging.py (100%) rename {style_text_rec => StyleTextRec}/utils/math_functions.py (100%) rename {style_text_rec => StyleTextRec}/utils/sys_funcs.py (100%) diff --git a/doc/doc_en/style_text_rec_en.md b/StyleTextRec/README.md similarity index 96% rename from doc/doc_en/style_text_rec_en.md rename to StyleTextRec/README.md index 7e7d29c9..36db8d44 100644 --- a/doc/doc_en/style_text_rec_en.md +++ b/StyleTextRec/README.md @@ -7,7 +7,7 @@ The following figure shows some example results. In addition, the actual `namepl #### Preparation -1. Please refer the [QUICK INSTALLATION](./installation_en.md) to install PaddlePaddle. Python3 environment is strongly recommended. +1. Please refer the [QUICK INSTALLATION](../doc/doc_en/installation_en.md) to install PaddlePaddle. Python3 environment is strongly recommended. 2. Download the pretrained models and unzip: ```bash diff --git a/doc/doc_ch/style_text_rec.md b/StyleTextRec/README_ch.md similarity index 93% rename from doc/doc_ch/style_text_rec.md rename to StyleTextRec/README_ch.md index 3a6d8b8b..052811a0 100644 --- a/doc/doc_ch/style_text_rec.md +++ b/StyleTextRec/README_ch.md @@ -9,21 +9,21 @@ ### 工具简介
- +
Style-Text是对百度自研文本编辑算法《Editing Text in the Wild》中提出的SRNet网络的改进,不同于常用的GAN的方法只选择一个分支,该工具将文本合成任务分解为三个子模块,文本风格迁移模块、背景抽取模块和前背景融合模块,来提升合成数据的效果。下图显示了一些示例结果。
- - + +
此外,在实际铭牌文本识别场景和韩语文本识别场景,验证了该合成工具的有效性。 ### 环境配置 -1. 参考[快速安装](./installation.md),安装PaddleOCR。强烈建议您使用python3环境。 +1. 参考[快速安装](../doc/doc_ch/installation.md),安装PaddleOCR。强烈建议您使用python3环境。 2. 进入`style_text_rec`目录,下载模型,并解压: ```bash @@ -55,7 +55,7 @@ python3 -m tools.synth_image -c configs/config.yml 1. 运行后,会生成`fake_busion.jpg`,即为最终结果。
- +
除此之外,程序还会生成并保存中间结果: * `fake_bg.jpg`:为风格参考图去掉文字后的背景; diff --git a/style_text_rec/__init__.py b/StyleTextRec/__init__.py similarity index 100% rename from style_text_rec/__init__.py rename to StyleTextRec/__init__.py diff --git a/style_text_rec/arch/__init__.py b/StyleTextRec/arch/__init__.py similarity index 100% rename from style_text_rec/arch/__init__.py rename to StyleTextRec/arch/__init__.py diff --git a/style_text_rec/arch/base_module.py b/StyleTextRec/arch/base_module.py similarity index 100% rename from style_text_rec/arch/base_module.py rename to StyleTextRec/arch/base_module.py diff --git a/style_text_rec/arch/decoder.py b/StyleTextRec/arch/decoder.py similarity index 100% rename from style_text_rec/arch/decoder.py rename to StyleTextRec/arch/decoder.py diff --git a/style_text_rec/arch/encoder.py b/StyleTextRec/arch/encoder.py similarity index 100% rename from style_text_rec/arch/encoder.py rename to StyleTextRec/arch/encoder.py diff --git a/style_text_rec/arch/spectral_norm.py b/StyleTextRec/arch/spectral_norm.py similarity index 100% rename from style_text_rec/arch/spectral_norm.py rename to StyleTextRec/arch/spectral_norm.py diff --git a/style_text_rec/arch/style_text_rec.py b/StyleTextRec/arch/style_text_rec.py similarity index 100% rename from style_text_rec/arch/style_text_rec.py rename to StyleTextRec/arch/style_text_rec.py diff --git a/style_text_rec/configs/config.yml b/StyleTextRec/configs/config.yml similarity index 100% rename from style_text_rec/configs/config.yml rename to StyleTextRec/configs/config.yml diff --git a/style_text_rec/configs/dataset_config.yml b/StyleTextRec/configs/dataset_config.yml similarity index 100% rename from style_text_rec/configs/dataset_config.yml rename to StyleTextRec/configs/dataset_config.yml diff --git a/doc/imgs_style_text/1.png b/StyleTextRec/doc/images/1.png similarity index 100% rename from doc/imgs_style_text/1.png rename to StyleTextRec/doc/images/1.png diff --git a/doc/imgs_style_text/2.png b/StyleTextRec/doc/images/2.png similarity index 100% rename from doc/imgs_style_text/2.png rename to StyleTextRec/doc/images/2.png diff --git a/doc/imgs_style_text/3.png b/StyleTextRec/doc/images/3.png similarity index 100% rename from doc/imgs_style_text/3.png rename to StyleTextRec/doc/images/3.png diff --git a/doc/imgs_style_text/4.jpg b/StyleTextRec/doc/images/4.jpg similarity index 100% rename from doc/imgs_style_text/4.jpg rename to StyleTextRec/doc/images/4.jpg diff --git a/doc/imgs_style_text/5.png b/StyleTextRec/doc/images/5.png similarity index 100% rename from doc/imgs_style_text/5.png rename to StyleTextRec/doc/images/5.png diff --git a/style_text_rec/engine/__init__.py b/StyleTextRec/engine/__init__.py similarity index 100% rename from style_text_rec/engine/__init__.py rename to StyleTextRec/engine/__init__.py diff --git a/style_text_rec/engine/corpus_generators.py b/StyleTextRec/engine/corpus_generators.py similarity index 100% rename from style_text_rec/engine/corpus_generators.py rename to StyleTextRec/engine/corpus_generators.py diff --git a/style_text_rec/engine/predictors.py b/StyleTextRec/engine/predictors.py similarity index 100% rename from style_text_rec/engine/predictors.py rename to StyleTextRec/engine/predictors.py diff --git a/style_text_rec/engine/style_samplers.py b/StyleTextRec/engine/style_samplers.py similarity index 100% rename from style_text_rec/engine/style_samplers.py rename to StyleTextRec/engine/style_samplers.py diff --git a/style_text_rec/engine/synthesisers.py b/StyleTextRec/engine/synthesisers.py similarity index 100% rename from style_text_rec/engine/synthesisers.py rename to StyleTextRec/engine/synthesisers.py diff --git a/style_text_rec/engine/text_drawers.py b/StyleTextRec/engine/text_drawers.py similarity index 100% rename from style_text_rec/engine/text_drawers.py rename to StyleTextRec/engine/text_drawers.py diff --git a/style_text_rec/engine/writers.py b/StyleTextRec/engine/writers.py similarity index 100% rename from style_text_rec/engine/writers.py rename to StyleTextRec/engine/writers.py diff --git a/style_text_rec/examples/corpus/example.txt b/StyleTextRec/examples/corpus/example.txt similarity index 100% rename from style_text_rec/examples/corpus/example.txt rename to StyleTextRec/examples/corpus/example.txt diff --git a/style_text_rec/examples/image_list.txt b/StyleTextRec/examples/image_list.txt similarity index 100% rename from style_text_rec/examples/image_list.txt rename to StyleTextRec/examples/image_list.txt diff --git a/style_text_rec/examples/style_images/1.jpg b/StyleTextRec/examples/style_images/1.jpg similarity index 100% rename from style_text_rec/examples/style_images/1.jpg rename to StyleTextRec/examples/style_images/1.jpg diff --git a/style_text_rec/examples/style_images/2.jpg b/StyleTextRec/examples/style_images/2.jpg similarity index 100% rename from style_text_rec/examples/style_images/2.jpg rename to StyleTextRec/examples/style_images/2.jpg diff --git a/style_text_rec/fonts/ch_standard.ttf b/StyleTextRec/fonts/ch_standard.ttf similarity index 100% rename from style_text_rec/fonts/ch_standard.ttf rename to StyleTextRec/fonts/ch_standard.ttf diff --git a/style_text_rec/fonts/en_standard.ttf b/StyleTextRec/fonts/en_standard.ttf similarity index 100% rename from style_text_rec/fonts/en_standard.ttf rename to StyleTextRec/fonts/en_standard.ttf diff --git a/style_text_rec/fonts/ko_standard.ttf b/StyleTextRec/fonts/ko_standard.ttf similarity index 100% rename from style_text_rec/fonts/ko_standard.ttf rename to StyleTextRec/fonts/ko_standard.ttf diff --git a/style_text_rec/tools/__init__.py b/StyleTextRec/tools/__init__.py similarity index 100% rename from style_text_rec/tools/__init__.py rename to StyleTextRec/tools/__init__.py diff --git a/style_text_rec/tools/synth_dataset.py b/StyleTextRec/tools/synth_dataset.py similarity index 100% rename from style_text_rec/tools/synth_dataset.py rename to StyleTextRec/tools/synth_dataset.py diff --git a/style_text_rec/tools/synth_image.py b/StyleTextRec/tools/synth_image.py similarity index 100% rename from style_text_rec/tools/synth_image.py rename to StyleTextRec/tools/synth_image.py diff --git a/style_text_rec/utils/__init__.py b/StyleTextRec/utils/__init__.py similarity index 100% rename from style_text_rec/utils/__init__.py rename to StyleTextRec/utils/__init__.py diff --git a/style_text_rec/utils/config.py b/StyleTextRec/utils/config.py similarity index 100% rename from style_text_rec/utils/config.py rename to StyleTextRec/utils/config.py diff --git a/style_text_rec/utils/load_params.py b/StyleTextRec/utils/load_params.py similarity index 100% rename from style_text_rec/utils/load_params.py rename to StyleTextRec/utils/load_params.py diff --git a/style_text_rec/utils/logging.py b/StyleTextRec/utils/logging.py similarity index 100% rename from style_text_rec/utils/logging.py rename to StyleTextRec/utils/logging.py diff --git a/style_text_rec/utils/math_functions.py b/StyleTextRec/utils/math_functions.py similarity index 100% rename from style_text_rec/utils/math_functions.py rename to StyleTextRec/utils/math_functions.py diff --git a/style_text_rec/utils/sys_funcs.py b/StyleTextRec/utils/sys_funcs.py similarity index 100% rename from style_text_rec/utils/sys_funcs.py rename to StyleTextRec/utils/sys_funcs.py