Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Calex_1990
PaddleOCR
提交
9a8f5d08
P
PaddleOCR
项目概览
Calex_1990
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
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,发现更多精彩内容 >>
提交
9a8f5d08
编写于
4月 22, 2021
作者:
J
Jethong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix name
上级
2365c70e
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
11 addition
and
11 deletion
+11
-11
configs/e2e/e2e_r50_vd_pg.yml
configs/e2e/e2e_r50_vd_pg.yml
+5
-5
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+5
-5
ppocr/data/imaug/pg_process.py
ppocr/data/imaug/pg_process.py
+1
-1
未找到文件。
configs/e2e/e2e_r50_vd_pg.yml
浏览文件 @
9a8f5d08
...
@@ -72,13 +72,13 @@ Train:
...
@@ -72,13 +72,13 @@ Train:
dataset
:
dataset
:
name
:
PGDataSet
name
:
PGDataSet
data_dir
:
./train_data/total_text/train
data_dir
:
./train_data/total_text/train
label_file_list
:
[
./train_data/total_text/train/
]
label_file_list
:
[
./train_data/total_text/train/
total_text.txt
]
ratio_list
:
[
1.0
]
ratio_list
:
[
1.0
]
transforms
:
transforms
:
-
DecodeImage
:
# load image
-
DecodeImage
:
# load image
img_mode
:
BGR
img_mode
:
BGR
channel_first
:
False
channel_first
:
False
-
E2ELabelEncode
_t
rain
:
-
E2ELabelEncode
T
rain
:
-
PGProcessTrain
:
-
PGProcessTrain
:
batch_size
:
14
# same as loader: batch_size_per_card
batch_size
:
14
# same as loader: batch_size_per_card
min_crop_size
:
24
min_crop_size
:
24
...
@@ -96,12 +96,12 @@ Eval:
...
@@ -96,12 +96,12 @@ Eval:
dataset
:
dataset
:
name
:
PGDataSet
name
:
PGDataSet
data_dir
:
./train_data/total_text/test
data_dir
:
./train_data/total_text/test
label_file_list
:
[
./train_data/total_text/test/
]
label_file_list
:
[
./train_data/total_text/test/
total_text.txt
]
transforms
:
transforms
:
-
DecodeImage
:
# load image
-
DecodeImage
:
# load image
img_mode
:
RGB
img_mode
:
RGB
channel_first
:
False
channel_first
:
False
-
E2ELabelEncode
_t
est
:
-
E2ELabelEncode
T
est
:
-
E2EResizeForTest
:
-
E2EResizeForTest
:
max_side_len
:
768
max_side_len
:
768
-
NormalizeImage
:
-
NormalizeImage
:
...
@@ -111,7 +111,7 @@ Eval:
...
@@ -111,7 +111,7 @@ Eval:
order
:
'
hwc'
order
:
'
hwc'
-
ToCHWImage
:
-
ToCHWImage
:
-
KeepKeys
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
texts'
,
'
tags'
,
'
img_id'
]
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
texts'
,
'
ignore_
tags'
,
'
img_id'
]
loader
:
loader
:
shuffle
:
False
shuffle
:
False
drop_last
:
False
drop_last
:
False
...
...
ppocr/data/imaug/label_ops.py
浏览文件 @
9a8f5d08
...
@@ -187,14 +187,14 @@ class CTCLabelEncode(BaseRecLabelEncode):
...
@@ -187,14 +187,14 @@ class CTCLabelEncode(BaseRecLabelEncode):
return
dict_character
return
dict_character
class
E2ELabelEncode
_t
est
(
BaseRecLabelEncode
):
class
E2ELabelEncode
T
est
(
BaseRecLabelEncode
):
def
__init__
(
self
,
def
__init__
(
self
,
max_text_length
,
max_text_length
,
character_dict_path
=
None
,
character_dict_path
=
None
,
character_type
=
'EN'
,
character_type
=
'EN'
,
use_space_char
=
False
,
use_space_char
=
False
,
**
kwargs
):
**
kwargs
):
super
(
E2ELabelEncode
_t
est
,
super
(
E2ELabelEncode
T
est
,
self
).
__init__
(
max_text_length
,
character_dict_path
,
self
).
__init__
(
max_text_length
,
character_dict_path
,
character_type
,
use_space_char
)
character_type
,
use_space_char
)
...
@@ -217,7 +217,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
...
@@ -217,7 +217,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
boxes
=
np
.
array
(
boxes
,
dtype
=
np
.
float32
)
boxes
=
np
.
array
(
boxes
,
dtype
=
np
.
float32
)
txt_tags
=
np
.
array
(
txt_tags
,
dtype
=
np
.
bool
)
txt_tags
=
np
.
array
(
txt_tags
,
dtype
=
np
.
bool
)
data
[
'polys'
]
=
boxes
data
[
'polys'
]
=
boxes
data
[
'tags'
]
=
txt_tags
data
[
'
ignore_
tags'
]
=
txt_tags
temp_texts
=
[]
temp_texts
=
[]
for
text
in
txts
:
for
text
in
txts
:
text
=
text
.
lower
()
text
=
text
.
lower
()
...
@@ -231,7 +231,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
...
@@ -231,7 +231,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
return
data
return
data
class
E2ELabelEncode
_t
rain
(
object
):
class
E2ELabelEncode
T
rain
(
object
):
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
pass
pass
...
@@ -255,7 +255,7 @@ class E2ELabelEncode_train(object):
...
@@ -255,7 +255,7 @@ class E2ELabelEncode_train(object):
data
[
'polys'
]
=
boxes
data
[
'polys'
]
=
boxes
data
[
'texts'
]
=
txts
data
[
'texts'
]
=
txts
data
[
'tags'
]
=
txt_tags
data
[
'
ignore_
tags'
]
=
txt_tags
return
data
return
data
...
...
ppocr/data/imaug/pg_process.py
浏览文件 @
9a8f5d08
...
@@ -750,7 +750,7 @@ class PGProcessTrain(object):
...
@@ -750,7 +750,7 @@ class PGProcessTrain(object):
input_size
=
512
input_size
=
512
im
=
data
[
'image'
]
im
=
data
[
'image'
]
text_polys
=
data
[
'polys'
]
text_polys
=
data
[
'polys'
]
text_tags
=
data
[
'tags'
]
text_tags
=
data
[
'
ignore_
tags'
]
text_strs
=
data
[
'texts'
]
text_strs
=
data
[
'texts'
]
h
,
w
,
_
=
im
.
shape
h
,
w
,
_
=
im
.
shape
text_polys
,
text_tags
,
hv_tags
=
self
.
check_and_validate_polys
(
text_polys
,
text_tags
,
hv_tags
=
self
.
check_and_validate_polys
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录