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
87f9fcec
Unverified
Commit
87f9fcec
authored
Dec 15, 2020
by
dyning
Committed by
GitHub
Dec 15, 2020
Browse files
Update README_ch.md
parent
c97359c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
StyleText/README_ch.md
StyleText/README_ch.md
+7
-3
No files found.
StyleText/README_ch.md
View file @
87f9fcec
...
@@ -86,9 +86,9 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -86,9 +86,9 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
#### 批量合成
#### 批量合成
在实际应用场景中,经常需要批量合成图片,补充到训练集中。StyleText可以使用一批风格图片和语料,批量合成数据。合成过程如下:
在实际应用场景中,经常需要批量合成图片,补充到训练集中。StyleText可以使用一批风格图片和语料,批量合成数据。合成过程如下:
首先,需要风格图片作为合成图片的参考依据,这些数据可以是用作训练OCR识别模型的数据集。本例中使用带有标注文件的数据集作为风格图片.
1.
在
`configs/dataset_config.yml`
中配置输入数据路径。
1.
在
`configs/dataset_config.yml`
中配置目标场景风格图像和语料的路径。
*
`StyleSampler`
:
*
`StyleSampler`
:
*
`method`
:使用的风格图片采样方法;
*
`method`
:使用的风格图片采样方法;
*
`image_home`
:风格图片目录;
*
`image_home`
:风格图片目录;
...
@@ -99,10 +99,14 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -99,10 +99,14 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
*
`language`
:语料的语种;
*
`language`
:语料的语种;
*
`corpus_file`
: 语料文件路径。
*
`corpus_file`
: 语料文件路径。
我们提供了一批中英韩5w通用数据供您试用 (
[
下载地址
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/style_text/chkoen_5w.tar
)
),下面给出了一些示例:
StyleText也提供了一批中英韩5万张通用场景数据用作文本风格图像,便于合成场景丰富的文本图像,下图给出了一些示例。
[
中英韩5万张通用场景数据下载地址
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/style_text/chkoen_5w.tar
)
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"doc/images/5.png"
width=
"800"
>
<img
src=
"doc/images/5.png"
width=
"800"
>
</div>
</div>
2.
运行
`tools/synth_dataset`
合成数据:
2.
运行
`tools/synth_dataset`
合成数据:
```
bash
```
bash
...
...
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