提交 5b9a8b9c 编写于 作者: W weishengyu

update doc

上级 99d83c05
......@@ -5,6 +5,7 @@
- [二、环境配置](#环境配置)
- [三、快速上手](#快速上手)
- [四、应用案例](#应用案例)
- [五、项目结构](#项目结构)
<a name="工具简介"></a>
### 一、工具简介
......@@ -53,15 +54,16 @@ fusion_generator:
<a name="快速上手"></a>
### 三、快速上手
#### 合成单张图
1. 运行tools/synth_image,生成示例图片:
- 合成单张图
运行tools/synth_image,合成单张图片:
```python
python3 -m tools.synth_image -c configs/config.yml
python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_images/2.jpg --text_corpus PaddleOCR --language en
```
2. 运行后,会生成`fake_busion.jpg`,即为最终结果。
例如,输入如下图片和语料"PaddleOCR":
<div align="center">
<img src="examples/style_images/1.jpg" width="300">
</div>
得到结果fake_fusion.jpg:
<div align="center">
<img src="doc/images/4.jpg" width="300">
</div>
......@@ -69,15 +71,9 @@ python3 -m tools.synth_image -c configs/config.yml
* `fake_bg.jpg`:为风格参考图去掉文字后的背景;
* `fake_text.jpg`:是用提供的字符串,仿照风格参考图中文字的风格,生成在灰色背景上的文字图片。
3. 如果您想尝试其他风格图像和文字的效果,可以添加style_image,text_corpus和language参数:
```python
python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_images/2.jpg --text_corpus PaddleOCR --language en
```
* 注意:语言选项和语料相对应,目前我们支持英文、简体中文和韩语。
4.`tools/synth_image.py`中,我们还提供了一个`batch_synth_images`方法,可以两两组合语料和图片,批量生成一批数据。
#### 批量合成
- 批量合成
在开始合成数据前,需要准备一些素材。
......@@ -127,7 +123,8 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
| 随机背景 | 韩语 | 5631 | 1230 | 0.3012 | 100000 | 0.5057 | 20% |
### 项目结构
<a name="项目结构"></a>
### 五、项目结构
```
style_text_rec
|-- arch
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册