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
e65c9f10
Unverified
Commit
e65c9f10
authored
Dec 15, 2020
by
dyning
Committed by
GitHub
Dec 15, 2020
Browse files
Merge pull request #1447 from weisy11/dygraph
update doc
parents
abf2a4fb
9802b934
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
StyleText/README_ch.md
StyleText/README_ch.md
+14
-9
StyleText/doc/images/7.jpg
StyleText/doc/images/7.jpg
+0
-0
StyleText/doc/images/8.jpg
StyleText/doc/images/8.jpg
+0
-0
No files found.
StyleText/README_ch.md
View file @
e65c9f10
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
-
[
二、环境配置
](
#环境配置
)
-
[
二、环境配置
](
#环境配置
)
-
[
三、快速上手
](
#快速上手
)
-
[
三、快速上手
](
#快速上手
)
-
[
四、应用案例
](
#应用案例
)
-
[
四、应用案例
](
#应用案例
)
-
[
五、
项目
结构
](
#
项目
结构
)
-
[
五、
代码
结构
](
#
代码
结构
)
<a
name=
"工具简介"
></a>
<a
name=
"工具简介"
></a>
### 一、工具简介
### 一、工具简介
...
@@ -54,14 +54,15 @@ fusion_generator:
...
@@ -54,14 +54,15 @@ fusion_generator:
<a
name=
"快速上手"
></a>
<a
name=
"快速上手"
></a>
### 三、快速上手
### 三、快速上手
-
合成单张图
####
合成单张图
运行tools/synth_image,合成单张图片:
输入一张风格图和一段文字语料,
运行tools/synth_image,合成单张图片:
```
python
```
python
python3
-
m
tools
.
synth_image
-
c
configs
/
config
.
yml
--
style_image
examples
/
style_images
/
2.j
pg
--
text_corpus
PaddleOCR
--
language
en
python3
-
m
tools
.
synth_image
-
c
configs
/
config
.
yml
--
style_image
examples
/
style_images
/
2.j
pg
--
text_corpus
PaddleOCR
--
language
en
```
```
*
注意:语言选项和语料相对应,目前我们支持英文、简体中文和韩语。
例如,输入如下图片和语料"PaddleOCR":
例如,输入如下图片和语料"PaddleOCR":
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"examples/style_images/
1
.jpg"
width=
"300"
>
<img
src=
"examples/style_images/
2
.jpg"
width=
"300"
>
</div>
</div>
得到结果fake_fusion.jpg:
得到结果fake_fusion.jpg:
<div
align=
"center"
>
<div
align=
"center"
>
...
@@ -69,11 +70,15 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -69,11 +70,15 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
</div>
</div>
除此之外,程序还会生成并保存中间结果:
除此之外,程序还会生成并保存中间结果:
*
`fake_bg.jpg`
:为风格参考图去掉文字后的背景;
*
`fake_bg.jpg`
:为风格参考图去掉文字后的背景;
<div
align=
"center"
>
<img
src=
"doc/images/7.jpg"
width=
"300"
>
</div>
*
`fake_text.jpg`
:是用提供的字符串,仿照风格参考图中文字的风格,生成在灰色背景上的文字图片。
*
`fake_text.jpg`
:是用提供的字符串,仿照风格参考图中文字的风格,生成在灰色背景上的文字图片。
<div
align=
"center"
>
<img
src=
"doc/images/8.jpg"
width=
"300"
>
</div>
*
注意:语言选项和语料相对应,目前我们支持英文、简体中文和韩语。
#### 批量合成
-
批量合成
在实际应用场景中,经常需要批量合成图片,补充到训练集中。StyleText可以使用一批风格图片和语料,批量合成数据。合成过程如下:
在实际应用场景中,经常需要批量合成图片,补充到训练集中。StyleText可以使用一批风格图片和语料,批量合成数据。合成过程如下:
首先,需要风格图片作为合成图片的参考依据,这些数据可以是用作训练OCR识别模型的数据集。本例中使用带有标注文件的数据集作为风格图片.
首先,需要风格图片作为合成图片的参考依据,这些数据可以是用作训练OCR识别模型的数据集。本例中使用带有标注文件的数据集作为风格图片.
...
@@ -121,8 +126,8 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -121,8 +126,8 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
| 随机背景 | 韩语 | 5631 | 1230 | 0.3012 | 100000 | 0.5057 | 20% |
| 随机背景 | 韩语 | 5631 | 1230 | 0.3012 | 100000 | 0.5057 | 20% |
<a
name=
"
项目
结构"
></a>
<a
name=
"
代码
结构"
></a>
### 五、
项目
结构
### 五、
代码
结构
```
```
style_text_rec
style_text_rec
|-- arch
|-- arch
...
...
StyleText/doc/images/7.jpg
0 → 100644
View file @
e65c9f10
1.78 KB
StyleText/doc/images/8.jpg
0 → 100644
View file @
e65c9f10
1.28 KB
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