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
22ac6bc5
Commit
22ac6bc5
authored
Dec 15, 2020
by
weishengyu
Browse files
rename files
parent
27830164
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
6 additions
and
6 deletions
+6
-6
StyleTextRec/README.md
StyleTextRec/README.md
+1
-1
StyleTextRec/README_ch.md
StyleTextRec/README_ch.md
+5
-5
StyleTextRec/__init__.py
StyleTextRec/__init__.py
+0
-0
StyleTextRec/arch/__init__.py
StyleTextRec/arch/__init__.py
+0
-0
StyleTextRec/arch/base_module.py
StyleTextRec/arch/base_module.py
+0
-0
StyleTextRec/arch/decoder.py
StyleTextRec/arch/decoder.py
+0
-0
StyleTextRec/arch/encoder.py
StyleTextRec/arch/encoder.py
+0
-0
StyleTextRec/arch/spectral_norm.py
StyleTextRec/arch/spectral_norm.py
+0
-0
StyleTextRec/arch/style_text_rec.py
StyleTextRec/arch/style_text_rec.py
+0
-0
StyleTextRec/configs/config.yml
StyleTextRec/configs/config.yml
+0
-0
StyleTextRec/configs/dataset_config.yml
StyleTextRec/configs/dataset_config.yml
+0
-0
StyleTextRec/doc/images/1.png
StyleTextRec/doc/images/1.png
+0
-0
StyleTextRec/doc/images/2.png
StyleTextRec/doc/images/2.png
+0
-0
StyleTextRec/doc/images/3.png
StyleTextRec/doc/images/3.png
+0
-0
StyleTextRec/doc/images/4.jpg
StyleTextRec/doc/images/4.jpg
+0
-0
StyleTextRec/doc/images/5.png
StyleTextRec/doc/images/5.png
+0
-0
StyleTextRec/engine/__init__.py
StyleTextRec/engine/__init__.py
+0
-0
StyleTextRec/engine/corpus_generators.py
StyleTextRec/engine/corpus_generators.py
+0
-0
StyleTextRec/engine/predictors.py
StyleTextRec/engine/predictors.py
+0
-0
StyleTextRec/engine/style_samplers.py
StyleTextRec/engine/style_samplers.py
+0
-0
No files found.
doc/doc_en/s
tyle
_t
ext
_rec_en
.md
→
S
tyle
T
ext
Rec/README
.md
View file @
22ac6bc5
...
@@ -7,7 +7,7 @@ The following figure shows some example results. In addition, the actual `namepl
...
@@ -7,7 +7,7 @@ The following figure shows some example results. In addition, the actual `namepl
#### Preparation
#### Preparation
1.
Please refer the
[
QUICK INSTALLATION
](
./installation_en.md
)
to install PaddlePaddle. Python3 environment is strongly recommended.
1.
Please refer the
[
QUICK INSTALLATION
](
.
./doc/doc_en
/installation_en.md
)
to install PaddlePaddle. Python3 environment is strongly recommended.
2.
Download the pretrained models and unzip:
2.
Download the pretrained models and unzip:
```
bash
```
bash
...
...
doc/doc_ch/s
tyle
_t
ext
_rec
.md
→
S
tyle
T
ext
Rec/README_ch
.md
View file @
22ac6bc5
...
@@ -9,21 +9,21 @@
...
@@ -9,21 +9,21 @@
### 工具简介
### 工具简介
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"
../imgs_style_text
/3.png"
width=
"800"
>
<img
src=
"
doc/images
/3.png"
width=
"800"
>
</div>
</div>
Style-Text是对百度自研文本编辑算法《Editing Text in the Wild》中提出的SRNet网络的改进,不同于常用的GAN的方法只选择一个分支,该工具将文本合成任务分解为三个子模块,文本风格迁移模块、背景抽取模块和前背景融合模块,来提升合成数据的效果。下图显示了一些示例结果。
Style-Text是对百度自研文本编辑算法《Editing Text in the Wild》中提出的SRNet网络的改进,不同于常用的GAN的方法只选择一个分支,该工具将文本合成任务分解为三个子模块,文本风格迁移模块、背景抽取模块和前背景融合模块,来提升合成数据的效果。下图显示了一些示例结果。
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"
../imgs_style_text
/1.png"
width=
"800"
>
<img
src=
"
doc/images
/1.png"
width=
"800"
>
<img
src=
"
../imgs_style_text
/2.png"
width=
"800"
>
<img
src=
"
doc/images
/2.png"
width=
"800"
>
</div>
</div>
此外,在实际铭牌文本识别场景和韩语文本识别场景,验证了该合成工具的有效性。
此外,在实际铭牌文本识别场景和韩语文本识别场景,验证了该合成工具的有效性。
### 环境配置
### 环境配置
1.
参考
[
快速安装
](
./installation.md
)
,安装PaddleOCR。强烈建议您使用python3环境。
1.
参考
[
快速安装
](
.
./doc/doc_ch
/installation.md
)
,安装PaddleOCR。强烈建议您使用python3环境。
2.
进入
`style_text_rec`
目录,下载模型,并解压:
2.
进入
`style_text_rec`
目录,下载模型,并解压:
```
bash
```
bash
...
@@ -55,7 +55,7 @@ python3 -m tools.synth_image -c configs/config.yml
...
@@ -55,7 +55,7 @@ python3 -m tools.synth_image -c configs/config.yml
1.
运行后,会生成
`fake_busion.jpg`
,即为最终结果。
1.
运行后,会生成
`fake_busion.jpg`
,即为最终结果。
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"
../imgs_style_text
/4.jpg"
width=
"300"
>
<img
src=
"
doc/images
/4.jpg"
width=
"300"
>
</div>
</div>
除此之外,程序还会生成并保存中间结果:
除此之外,程序还会生成并保存中间结果:
*
`fake_bg.jpg`
:为风格参考图去掉文字后的背景;
*
`fake_bg.jpg`
:为风格参考图去掉文字后的背景;
...
...
s
tyle
_t
ext
_r
ec/__init__.py
→
S
tyle
T
ext
R
ec/__init__.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/arch/__init__.py
→
S
tyle
T
ext
R
ec/arch/__init__.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/arch/base_module.py
→
S
tyle
T
ext
R
ec/arch/base_module.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/arch/decoder.py
→
S
tyle
T
ext
R
ec/arch/decoder.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/arch/encoder.py
→
S
tyle
T
ext
R
ec/arch/encoder.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/arch/spectral_norm.py
→
S
tyle
T
ext
R
ec/arch/spectral_norm.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/arch/style_text_rec.py
→
S
tyle
T
ext
R
ec/arch/style_text_rec.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/configs/config.yml
→
S
tyle
T
ext
R
ec/configs/config.yml
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/configs/dataset_config.yml
→
S
tyle
T
ext
R
ec/configs/dataset_config.yml
View file @
22ac6bc5
File moved
doc/imgs_style_text
/1.png
→
StyleTextRec/doc/images
/1.png
View file @
22ac6bc5
File moved
doc/imgs_style_text
/2.png
→
StyleTextRec/doc/images
/2.png
View file @
22ac6bc5
File moved
doc/imgs_style_text
/3.png
→
StyleTextRec/doc/images
/3.png
View file @
22ac6bc5
File moved
doc/imgs_style_text
/4.jpg
→
StyleTextRec/doc/images
/4.jpg
View file @
22ac6bc5
File moved
doc/imgs_style_text
/5.png
→
StyleTextRec/doc/images
/5.png
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/engine/__init__.py
→
S
tyle
T
ext
R
ec/engine/__init__.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/engine/corpus_generators.py
→
S
tyle
T
ext
R
ec/engine/corpus_generators.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/engine/predictors.py
→
S
tyle
T
ext
R
ec/engine/predictors.py
View file @
22ac6bc5
File moved
s
tyle
_t
ext
_r
ec/engine/style_samplers.py
→
S
tyle
T
ext
R
ec/engine/style_samplers.py
View file @
22ac6bc5
File moved
Prev
1
2
Next
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