Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleOCR
提交
8d9324ca
P
PaddleOCR
项目概览
PaddlePaddle
/
PaddleOCR
1 年多 前同步成功
通知
1532
Star
32963
Fork
6643
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
108
列表
看板
标记
里程碑
合并请求
7
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
108
Issue
108
列表
看板
标记
里程碑
合并请求
7
合并请求
7
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8d9324ca
编写于
6月 03, 2020
作者:
T
tink2123
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set drop_last=false
上级
9023a5c5
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
27 addition
and
15 deletion
+27
-15
configs/det/det_mv3_db.yml
configs/det/det_mv3_db.yml
+1
-0
configs/det/det_mv3_east.yml
configs/det/det_mv3_east.yml
+1
-0
configs/det/det_r50_vd_db.yml
configs/det/det_r50_vd_db.yml
+1
-0
configs/det/det_r50_vd_east.yml
configs/det/det_r50_vd_east.yml
+1
-0
configs/rec/rec_chinese_lite_train.yml
configs/rec/rec_chinese_lite_train.yml
+1
-1
configs/rec/rec_icdar15_train.yml
configs/rec/rec_icdar15_train.yml
+2
-2
configs/rec/rec_mv3_none_bilstm_ctc.yml
configs/rec/rec_mv3_none_bilstm_ctc.yml
+1
-1
configs/rec/rec_mv3_none_none_ctc.yml
configs/rec/rec_mv3_none_none_ctc.yml
+1
-1
configs/rec/rec_mv3_tps_bilstm_attn.yml
configs/rec/rec_mv3_tps_bilstm_attn.yml
+1
-1
configs/rec/rec_mv3_tps_bilstm_ctc.yml
configs/rec/rec_mv3_tps_bilstm_ctc.yml
+1
-1
configs/rec/rec_r34_vd_none_bilstm_ctc.yml
configs/rec/rec_r34_vd_none_bilstm_ctc.yml
+1
-1
configs/rec/rec_r34_vd_none_none_ctc.yml
configs/rec/rec_r34_vd_none_none_ctc.yml
+1
-1
configs/rec/rec_r34_vd_tps_bilstm_attn.yml
configs/rec/rec_r34_vd_tps_bilstm_attn.yml
+1
-1
configs/rec/rec_r34_vd_tps_bilstm_ctc.yml
configs/rec/rec_r34_vd_tps_bilstm_ctc.yml
+1
-1
ppocr/data/det/dataset_traversal.py
ppocr/data/det/dataset_traversal.py
+4
-2
ppocr/data/rec/dataset_traversal.py
ppocr/data/rec/dataset_traversal.py
+8
-2
未找到文件。
configs/det/det_mv3_db.yml
浏览文件 @
8d9324ca
...
...
@@ -9,6 +9,7 @@ Global:
eval_batch_step
:
5000
train_batch_size_per_card
:
16
test_batch_size_per_card
:
16
drop_last
:
false
image_shape
:
[
3
,
640
,
640
]
reader_yml
:
./configs/det/det_db_icdar15_reader.yml
pretrain_weights
:
./pretrain_models/MobileNetV3_large_x0_5_pretrained/
...
...
configs/det/det_mv3_east.yml
浏览文件 @
8d9324ca
...
...
@@ -9,6 +9,7 @@ Global:
eval_batch_step
:
5000
train_batch_size_per_card
:
16
test_batch_size_per_card
:
16
drop_last
:
false
image_shape
:
[
3
,
512
,
512
]
reader_yml
:
./configs/det/det_east_icdar15_reader.yml
pretrain_weights
:
./pretrain_models/MobileNetV3_large_x0_5_pretrained/
...
...
configs/det/det_r50_vd_db.yml
浏览文件 @
8d9324ca
...
...
@@ -10,6 +10,7 @@ Global:
train_batch_size_per_card
:
8
test_batch_size_per_card
:
16
image_shape
:
[
3
,
640
,
640
]
drop_last
:
false
reader_yml
:
./configs/det/det_db_icdar15_reader.yml
pretrain_weights
:
./pretrain_models/ResNet50_vd_ssld_pretrained/
save_res_path
:
./output/det_db/predicts_db.txt
...
...
configs/det/det_r50_vd_east.yml
浏览文件 @
8d9324ca
...
...
@@ -10,6 +10,7 @@ Global:
train_batch_size_per_card
:
8
test_batch_size_per_card
:
16
image_shape
:
[
3
,
512
,
512
]
drop_last
:
false
reader_yml
:
./configs/det/det_east_icdar15_reader.yml
pretrain_weights
:
./pretrain_models/ResNet50_vd_ssld_pretrained/
save_res_path
:
./output/det_east/predicts_east.txt
...
...
configs/rec/rec_chinese_lite_train.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
320
]
max_text_length
:
25
character_type
:
ch
...
...
configs/rec/rec_icdar15_train.yml
浏览文件 @
8d9324ca
...
...
@@ -8,14 +8,14 @@ Global:
save_epoch_step
:
300
eval_batch_step
:
500
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
loss_type
:
ctc
reader_yml
:
./configs/rec/rec_icdar15_reader.yml
pretrain_weights
:
./pretrain_models/rec_mv3_none_bilstm_ctc/best_accuracy
pretrain_weights
:
checkpoints
:
save_inference_dir
:
infer_img
:
...
...
configs/rec/rec_mv3_none_bilstm_ctc.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
configs/rec/rec_mv3_none_none_ctc.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
configs/rec/rec_mv3_tps_bilstm_attn.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
configs/rec/rec_mv3_tps_bilstm_ctc.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
configs/rec/rec_r34_vd_none_bilstm_ctc.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
configs/rec/rec_r34_vd_none_none_ctc.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
configs/rec/rec_r34_vd_tps_bilstm_attn.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
configs/rec/rec_r34_vd_tps_bilstm_ctc.yml
浏览文件 @
8d9324ca
...
...
@@ -8,8 +8,8 @@ Global:
save_epoch_step
:
3
eval_batch_step
:
2000
train_batch_size_per_card
:
256
drop_last
:
true
test_batch_size_per_card
:
256
drop_last
:
false
image_shape
:
[
3
,
32
,
100
]
max_text_length
:
25
character_type
:
en
...
...
ppocr/data/det/dataset_traversal.py
浏览文件 @
8d9324ca
...
...
@@ -32,6 +32,7 @@ class TrainReader(object):
self
.
num_workers
=
params
[
'num_workers'
]
self
.
label_file_path
=
params
[
'label_file_path'
]
self
.
batch_size
=
params
[
'train_batch_size_per_card'
]
self
.
drop_last
=
params
[
'drop_last'
]
assert
'process_function'
in
params
,
\
"absence process_function in Reader"
self
.
process
=
create_module
(
params
[
'process_function'
])(
params
)
...
...
@@ -61,8 +62,9 @@ class TrainReader(object):
if
len
(
batch_outs
)
==
self
.
batch_size
:
yield
batch_outs
batch_outs
=
[]
if
len
(
batch_outs
)
!=
0
:
yield
batch_outs
if
not
self
.
drop_last
:
if
len
(
batch_outs
)
!=
0
:
yield
batch_outs
return
batch_iter_reader
...
...
ppocr/data/rec/dataset_traversal.py
浏览文件 @
8d9324ca
...
...
@@ -42,6 +42,7 @@ class LMDBReader(object):
self
.
max_text_length
=
params
[
'max_text_length'
]
self
.
mode
=
params
[
'mode'
]
self
.
drop_last
=
False
self
.
tps
=
False
if
"tps"
in
params
:
self
.
tps
=
True
if
params
[
'mode'
]
==
'train'
:
...
...
@@ -180,6 +181,9 @@ class SimpleReader(object):
self
.
max_text_length
=
params
[
'max_text_length'
]
self
.
mode
=
params
[
'mode'
]
self
.
infer_img
=
params
[
'infer_img'
]
self
.
tps
=
False
if
"tps"
in
params
:
self
.
tps
=
True
self
.
drop_last
=
False
if
params
[
'mode'
]
==
'train'
:
self
.
batch_size
=
params
[
'train_batch_size_per_card'
]
...
...
@@ -192,7 +196,7 @@ class SimpleReader(object):
process_id
=
0
def
sample_iter_reader
():
if
self
.
infer_img
is
not
None
:
if
self
.
mode
!=
'train'
and
self
.
infer_img
is
not
None
:
image_file_list
=
get_image_file_list
(
self
.
infer_img
)
for
single_img
in
image_file_list
:
img
=
cv2
.
imread
(
single_img
)
...
...
@@ -201,7 +205,9 @@ class SimpleReader(object):
norm_img
=
process_image
(
img
=
img
,
image_shape
=
self
.
image_shape
,
char_ops
=
self
.
char_ops
)
char_ops
=
self
.
char_ops
,
tps
=
self
.
tps
,
infer_mode
=
True
)
yield
norm_img
else
:
with
open
(
self
.
label_file_path
,
"rb"
)
as
fin
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录