Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
devil_zzz123
PaddleOCR
提交
79a2a321
P
PaddleOCR
项目概览
devil_zzz123
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
79a2a321
编写于
12月 15, 2020
作者:
littletomatodonkey
浏览文件
操作
浏览文件
下载
差异文件
fix conflict
上级
25becc01
4b19d372
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
21 deletion
+23
-21
README.md
README.md
+1
-1
StyleText/README.md
StyleText/README.md
+1
-1
StyleText/README_ch.md
StyleText/README_ch.md
+21
-19
未找到文件。
README.md
浏览文件 @
79a2a321
...
@@ -97,7 +97,7 @@ For a new language request, please refer to [Guideline for new language_requests
...
@@ -97,7 +97,7 @@ For a new language request, please refer to [Guideline for new language_requests
-
[
Benchmark
](
./doc/doc_en/benchmark_en.md
)
-
[
Benchmark
](
./doc/doc_en/benchmark_en.md
)
-
Data Annotation and Synthesis
-
Data Annotation and Synthesis
-
[
Semi-automatic Annotation Tool: PPOCRLabel
](
./PPOCRLabel/README.md
)
-
[
Semi-automatic Annotation Tool: PPOCRLabel
](
./PPOCRLabel/README.md
)
-
[
Data Synthesis Tool: Style
_Edit
](
./StyleTextRec
/README.md
)
-
[
Data Synthesis Tool: Style
-Text
](
./StyleText
/README.md
)
-
[
Other Data Annotation Tools
](
./doc/doc_en/data_annotation_en.md
)
-
[
Other Data Annotation Tools
](
./doc/doc_en/data_annotation_en.md
)
-
[
Other Data Synthesis Tools
](
./doc/doc_en/data_synthesis_en.md
)
-
[
Other Data Synthesis Tools
](
./doc/doc_en/data_synthesis_en.md
)
-
Datasets
-
Datasets
...
...
StyleText/README.md
浏览文件 @
79a2a321
...
@@ -153,7 +153,7 @@ After adding the above synthetic data for training, the accuracy of the recognit
...
@@ -153,7 +153,7 @@ After adding the above synthetic data for training, the accuracy of the recognit
### Code Structure
### Code Structure
```
```
style_text_rec
StyleText
|-- arch // Network module files.
|-- arch // Network module files.
| |-- base_module.py
| |-- base_module.py
| |-- decoder.py
| |-- decoder.py
...
...
StyleText/README_ch.md
浏览文件 @
79a2a321
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
## Style Text
## Style Text
### 目录
### 目录
-
[
一、工具简介
](
#工具简介
)
-
[
一、工具简介
](
#工具简介
)
-
[
二、环境配置
](
#环境配置
)
-
[
二、环境配置
](
#环境配置
)
...
@@ -88,7 +89,7 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -88,7 +89,7 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
</div>
</div>
#### 批量合成
#### 批量合成
在实际应用场景中,经常需要批量合成图片,补充到训练集中。StyleText可以使用一批风格图片和语料,批量合成数据。合成过程如下:
在实际应用场景中,经常需要批量合成图片,补充到训练集中。Style
-
Text可以使用一批风格图片和语料,批量合成数据。合成过程如下:
1.
在
`configs/dataset_config.yml`
中配置目标场景风格图像和语料的路径,具体如下:
1.
在
`configs/dataset_config.yml`
中配置目标场景风格图像和语料的路径,具体如下:
...
@@ -103,7 +104,7 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -103,7 +104,7 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
*
`language`
:语料的语种;
*
`language`
:语料的语种;
*
`corpus_file`
: 语料文件路径。
*
`corpus_file`
: 语料文件路径。
StyleText也提供了一批中英韩5万张通用场景数据用作文本风格图像,便于合成场景丰富的文本图像,下图给出了一些示例。
Style
-
Text也提供了一批中英韩5万张通用场景数据用作文本风格图像,便于合成场景丰富的文本图像,下图给出了一些示例。
中英韩5万张通用场景数据:
[
下载地址
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/style_text/chkoen_5w.tar
)
中英韩5万张通用场景数据:
[
下载地址
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/style_text/chkoen_5w.tar
)
...
@@ -119,7 +120,7 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -119,7 +120,7 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
<a
name=
"应用案例"
></a>
<a
name=
"应用案例"
></a>
### 四、应用案例
### 四、应用案例
下面以金属表面英文数字识别和通用韩语识别两个场景为例,说明使用StyleText合成数据,来提升文本识别效果的实际案例。下图给出了一些真实场景图像和合成图像的示例:
下面以金属表面英文数字识别和通用韩语识别两个场景为例,说明使用Style
-
Text合成数据,来提升文本识别效果的实际案例。下图给出了一些真实场景图像和合成图像的示例:
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"doc/images/6.png"
width=
"800"
>
<img
src=
"doc/images/6.png"
width=
"800"
>
...
@@ -135,40 +136,41 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
...
@@ -135,40 +136,41 @@ python3 -m tools.synth_image -c configs/config.yml --style_image examples/style_
<a
name=
"代码结构"
></a>
<a
name=
"代码结构"
></a>
### 五、代码结构
### 五、代码结构
```
```
style_text_rec
StyleText
|-- arch
|-- arch
// 网络结构定义文件
| |-- base_module.py
| |-- base_module.py
| |-- decoder.py
| |-- decoder.py
| |-- encoder.py
| |-- encoder.py
| |-- spectral_norm.py
| |-- spectral_norm.py
| `-- style_text_rec.py
| `-- style_text_rec.py
|-- configs
|-- configs
// 配置文件
| |-- config.yml
| |-- config.yml
| `-- dataset_config.yml
| `-- dataset_config.yml
|-- engine
|-- engine
// 数据合成引擎
| |-- corpus_generators.py
| |-- corpus_generators.py
// 从文本采样或随机生成语料
| |-- predictors.py
| |-- predictors.py
// 调用网络生成数据
| |-- style_samplers.py
| |-- style_samplers.py
// 采样风格图片
| |-- synthesisers.py
| |-- synthesisers.py
// 调度各个模块,合成数据
| |-- text_drawers.py
| |-- text_drawers.py
// 生成标准文字图片,用作输入
| `-- writers.py
| `-- writers.py
// 将合成的图片和标签写入本地目录
|-- examples
|-- examples
// 示例文件
| |-- corpus
| |-- corpus
| | `-- example.txt
| | `-- example.txt
| |-- image_list.txt
| |-- image_list.txt
| `-- style_images
| `-- style_images
| |-- 1.jpg
| |-- 1.jpg
| `-- 2.jpg
| `-- 2.jpg
|-- fonts
|-- fonts
// 字体文件
| |-- ch_standard.ttf
| |-- ch_standard.ttf
| |-- en_standard.ttf
| |-- en_standard.ttf
| `-- ko_standard.ttf
| `-- ko_standard.ttf
|-- tools
|-- tools
// 程序入口
| |-- __init__.py
| |-- __init__.py
| |-- synth_dataset.py
| |-- synth_dataset.py
// 批量合成数据
| `-- synth_image.py
| `-- synth_image.py
// 合成单张图片
`-- utils
`-- utils
// 其他基础功能模块
|-- config.py
|-- config.py
|-- load_params.py
|-- load_params.py
|-- logging.py
|-- logging.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录