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
b8007177
"tests/vscode:/vscode.git/clone" did not exist on "c009c203be24ecc883bc3553f564842c1d5e8ff9"
Commit
b8007177
authored
Dec 16, 2020
by
weishengyu
Browse files
add examples in doc
parent
f4185102
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
5 deletions
+29
-5
StyleText/README.md
StyleText/README.md
+12
-1
StyleText/README_ch.md
StyleText/README_ch.md
+13
-0
StyleText/configs/dataset_config.yml
StyleText/configs/dataset_config.yml
+3
-3
StyleText/examples/corpus/example.txt
StyleText/examples/corpus/example.txt
+1
-1
StyleText/examples/style_images/12.png
StyleText/examples/style_images/12.png
+0
-0
No files found.
StyleText/README.md
View file @
b8007177
...
@@ -138,7 +138,18 @@ We provide a general dataset containing Chinese, English and Korean (50,000 imag
...
@@ -138,7 +138,18 @@ We provide a general dataset containing Chinese, English and Korean (50,000 imag
```
bash
```
bash
python
-m
tools.synth_dataset.py
-c
configs/dataset_config.yml
python
-m
tools.synth_dataset.py
-c
configs/dataset_config.yml
```
```
We also provide example corpus and images in
`example`
folder.
<div
align=
"center"
>
<img
src=
"examples/style_images/1.jpg"
width=
"300"
>
<img
src=
"examples/style_images/2.jpg"
width=
"300"
>
</div>
If you run the code above directly, you will get example output data in
`output_data`
folder.
You will get synthesis images and labels as below:
<div
align=
"center"
>
<img
src=
"doc/images/12.png"
width=
"800"
>
</div>
There will be some cache under the
`label`
folder. If the program exit unexpectedly, you can find cached labels there.
When the program finish normally, you will find all the labels in
`label.txt`
which give the final results.
<a
name=
"Applications"
></a>
<a
name=
"Applications"
></a>
### Applications
### Applications
...
...
StyleText/README_ch.md
View file @
b8007177
...
@@ -126,6 +126,19 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -126,6 +126,19 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
```
bash
```
bash
python
-m
tools.synth_dataset
-c
configs/dataset_config.yml
python
-m
tools.synth_dataset
-c
configs/dataset_config.yml
```
```
我们在example提供了样例图片和语料在example中。
<div
align=
"center"
>
<img
src=
"examples/style_images/1.jpg"
width=
"300"
>
<img
src=
"examples/style_images/2.jpg"
width=
"300"
>
</div>
直接运行上述命令,可以在output_data中产生样例输出,包括图片和用于训练识别模型的标注文件:
<div
align=
"center"
>
<img
src=
"doc/images/12.png"
width=
"800"
>
</div>
其中label目录下的标注文件为程序运行过程中产生的缓存,如果程序在中途异常终止,可以使用缓存的标注文件。
如果程序正常运行完毕,则会在output_data下生成label.txt,为最终的标注结果。
<a
name=
"应用案例"
></a>
<a
name=
"应用案例"
></a>
### 四、应用案例
### 四、应用案例
...
...
StyleText/configs/dataset_config.yml
View file @
b8007177
...
@@ -33,7 +33,7 @@ Predictor:
...
@@ -33,7 +33,7 @@ Predictor:
-
0.5
-
0.5
expand_result
:
false
expand_result
:
false
bg_generator
:
bg_generator
:
pretrain
:
models/
style_text_
rec
/bg_generator
pretrain
:
style_text_
models
/bg_generator
module_name
:
bg_generator
module_name
:
bg_generator
generator_type
:
BgGeneratorWithMask
generator_type
:
BgGeneratorWithMask
encode_dim
:
64
encode_dim
:
64
...
@@ -43,7 +43,7 @@ Predictor:
...
@@ -43,7 +43,7 @@ Predictor:
conv_block_dilation
:
true
conv_block_dilation
:
true
output_factor
:
1.05
output_factor
:
1.05
text_generator
:
text_generator
:
pretrain
:
models/
style_text_
rec
/text_generator
pretrain
:
style_text_
models
/text_generator
module_name
:
text_generator
module_name
:
text_generator
generator_type
:
TextGenerator
generator_type
:
TextGenerator
encode_dim
:
64
encode_dim
:
64
...
@@ -52,7 +52,7 @@ Predictor:
...
@@ -52,7 +52,7 @@ Predictor:
conv_block_dropout
:
false
conv_block_dropout
:
false
conv_block_dilation
:
true
conv_block_dilation
:
true
fusion_generator
:
fusion_generator
:
pretrain
:
models/
style_text_
rec
/fusion_generator
pretrain
:
style_text_
models
/fusion_generator
module_name
:
fusion_generator
module_name
:
fusion_generator
generator_type
:
FusionGeneratorSimple
generator_type
:
FusionGeneratorSimple
encode_dim
:
64
encode_dim
:
64
...
...
StyleText/examples/corpus/example.txt
View file @
b8007177
Paddle
OCR
Paddle
飞桨文字识别
飞桨文字识别
StyleText/examples/style_images/12.png
0 → 100644
View file @
b8007177
115 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