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
e27c136a
"...git@developer.sourcefind.cn:chenpangpang/diffusers.git" did not exist on "cca59ce3a289d8837d81747389f997d6a1564d1d"
Commit
e27c136a
authored
Dec 15, 2020
by
weishengyu
Browse files
add images and charts
parent
22ac6bc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
StyleTextRec/README_ch.md
StyleTextRec/README_ch.md
+16
-4
StyleTextRec/doc/images/6.png
StyleTextRec/doc/images/6.png
+0
-0
No files found.
StyleTextRec/README_ch.md
View file @
e27c136a
...
@@ -66,7 +66,7 @@ python3 -m tools.synth_image -c configs/config.yml
...
@@ -66,7 +66,7 @@ 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
python3
-
m
tools
.
synth_image
-
c
configs
/
config
.
yml
--
style_image
examples
/
style_images
/
2.j
pg
--
text_corpus
PaddleOCR
--
language
en
```
```
*
注意:语言选项和语料相对应,目前我们支持英文、简体中文和韩语。
*
注意:语言选项和语料相对应,目前我们支持英文、简体中文和韩语。
3.
在
`tools/synth_image.py`
中,我们还提供了一个
`batch_synth_images`
方法,可以两两组合语料和图片,批量生成一批数据。
3.
在
`tools/synth_image.py`
中,我们还提供了一个
`batch_synth_images`
方法,可以两两组合语料和图片,批量生成一批数据。
### 高级使用
### 高级使用
...
@@ -81,12 +81,15 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -81,12 +81,15 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
*
`image_home`
:风格图片目录;
*
`image_home`
:风格图片目录;
*
`label_file`
:风格图片路径列表文件,如果所用数据集有label,则label_file为label文件路径;
*
`label_file`
:风格图片路径列表文件,如果所用数据集有label,则label_file为label文件路径;
*
`with_label`
:标志
`label_file`
是否为label文件。
*
`with_label`
:标志
`label_file`
是否为label文件。
我们提供了一批
[
样例图
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/style_text/chkoen_5w.tar
)
供您试用。
*
`CorpusGenerator`
:
*
`CorpusGenerator`
:
*
`method`
:语料生成方法,目前有
`FileCorpus`
和
`EnNumCorpus`
可选。如果使用
`EnNumCorpus`
,则不需要填写其他配置,否则需要修改
`corpus_file`
和
`language`
;
*
`method`
:语料生成方法,目前有
`FileCorpus`
和
`EnNumCorpus`
可选。如果使用
`EnNumCorpus`
,则不需要填写其他配置,否则需要修改
`corpus_file`
和
`language`
;
*
`language`
:语料的语种;
*
`language`
:语料的语种;
*
`corpus_file`
: 语料文件路径。
*
`corpus_file`
: 语料文件路径。
我们提供了一批
[
样例图
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/style_text/chkoen_5w.tar
)
供您试用,下面给出了一些示例:
<div
align=
"center"
>
<img
src=
"doc/images/5.png"
width=
"800"
>
</div>
2.
运行
`tools/synth_dataset`
合成数据:
2.
运行
`tools/synth_dataset`
合成数据:
```
bash
```
bash
...
@@ -104,8 +107,17 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -104,8 +107,17 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
### 应用示例
### 应用示例
在完成上述操作后,即可得到用于OCR识别的合成数据集,下面给出了一些数据集生成的示例:
在完成上述操作后,即可得到用于OCR识别的合成数据集,下面给出了一些数据集生成的示例:
<div
align=
"center"
>
<img
src=
"doc/images/6.png"
width=
"800"
>
</div>
请您参考
[
OCR识别文档
](
https://github.com/PaddlePaddle/PaddleOCR/blob/dygraph/doc/doc_ch/recognition.md#%E5%90%AF%E5%8A%A8%E8%AE%AD%E7%BB%83
)
,完成训练。
下面展示了一些使用合成数据训练的效果:
接下来请参考
[
OCR识别文档
](
https://github.com/PaddlePaddle/PaddleOCR/blob/dygraph/doc/doc_ch/recognition.md#%E5%90%AF%E5%8A%A8%E8%AE%AD%E7%BB%83
)
,完成训练。
| 场景 | 字符 | 原始数据 | 测试数据 | 只使用原始数据的识别准确率 | 新增合成数据 | 使用合成数据识别准确率 | 指标提升 |
| -------- | ---------- | -------- | -------- | -------------------------- | ------------ | ---------------------- | -------- |
| 金属表面 | 英文和数字 | 2203 | 650 | 0.5938 | 20000 | 0.7546 | 16% |
| 随机背景 | 韩语 | 5631 | 1230 | 0.3012 | 100000 | 0.5057 | 20% |
### 项目结构
### 项目结构
```
```
...
...
StyleTextRec/doc/images/6.png
0 → 100644
View file @
e27c136a
125 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