Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
5b9a8b9c
"vscode:/vscode.git/clone" did not exist on "31b211bfe36f7f04d61bcfb1253792b99d5c89d9"
Commit
5b9a8b9c
authored
Dec 15, 2020
by
weishengyu
Browse files
update doc
parent
99d83c05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
StyleText/README_ch.md
StyleText/README_ch.md
+12
-15
No files found.
StyleText/README_ch.md
View file @
5b9a8b9c
...
...
@@ -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.j
pg
--
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.j
pg
--
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment