Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
9236f33b
P
PaddleOCR
项目概览
weixin_41840029
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
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看板
未验证
提交
9236f33b
编写于
8月 06, 2021
作者:
D
Double_V
提交者:
GitHub
8月 06, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3511 from tink2123/new_ci_shell
update ocr_rec_params for ci shell
上级
29dbd887
467bd1ea
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
76 addition
and
14 deletion
+76
-14
configs/rec/rec_icdar15_train.yml
configs/rec/rec_icdar15_train.yml
+5
-5
tests/ocr_det_params.txt
tests/ocr_det_params.txt
+1
-0
tests/ocr_rec_params.txt
tests/ocr_rec_params.txt
+51
-0
tests/prepare.sh
tests/prepare.sh
+19
-9
未找到文件。
configs/rec/rec_icdar15_train.yml
浏览文件 @
9236f33b
...
...
@@ -10,7 +10,7 @@ Global:
cal_metric_during_train
:
True
pretrained_model
:
checkpoints
:
save_inference_dir
:
save_inference_dir
:
./
use_visualdl
:
False
infer_img
:
doc/imgs_words_en/word_10.png
# for data or label process
...
...
@@ -60,8 +60,8 @@ Metric:
Train
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/
label_file_list
:
[
"
./train_data/
train_list
.txt"
]
data_dir
:
./train_data/
ic15_data/
label_file_list
:
[
"
./train_data/
ic15_data/rec_gt_train
.txt"
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
...
...
@@ -81,8 +81,8 @@ Train:
Eval
:
dataset
:
name
:
SimpleDataSet
data_dir
:
./train_data/
label_file_list
:
[
"
./train_data/
val_li
st.txt"
]
data_dir
:
./train_data/
ic15_data
label_file_list
:
[
"
./train_data/
ic15_data/rec_gt_te
st.txt"
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
...
...
tests/ocr_det_params.txt
浏览文件 @
9236f33b
...
...
@@ -49,3 +49,4 @@ inference:tools/infer/predict_det.py
--save_log_path:null
--benchmark:True
null:null
tests/ocr_rec_params.txt
0 → 100644
浏览文件 @
9236f33b
===========================train_params===========================
model_name:ocr_rec
python:python3.7
gpu_list:0|2,3
Global.use_gpu:True|True
Global.auto_cast:null
Global.epoch_num:lite_train_infer=2|whole_train_infer=300
Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_infer=128|whole_train_infer=128
Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./train_data/ic15_data/train
null:null
##
trainer:norm_train|pact_train
norm_train:tools/train.py -c configs/rec/rec_icdar15_train.yml -o
pact_train:deploy/slim/quantization/quant.py -c configs/rec/rec_icdar15_train.yml -o
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c configs/rec/rec_icdar15_train.yml -o
null:null
##
===========================infer_params===========================
Global.save_inference_dir:./output/
Global.pretrained_model:
norm_export:tools/export_model.py -c configs/rec/rec_icdar15_train.yml -o
quant_export:deploy/slim/quantization/export_model.py -c configs/rec/rec_icdar15_train.yml -o
fpgm_export:null
distill_export:null
export1:null
export2:null
##
infer_model:./inference/ch_ppocr_mobile_v2.0_rec_infer/
infer_export:null
infer_quant:False
inference:tools/infer/predict_rec.py
--use_gpu:True|False
--enable_mkldnn:True|False
--cpu_threads:1|6
--rec_batch_num:1
--use_tensorrt:True|False
--precision:fp32|fp16|int8
--rec_model_dir:
--image_dir:./inference/rec_inference
--save_log_path:./test/output/
--benchmark:True
null:null
tests/prepare.sh
浏览文件 @
9236f33b
...
...
@@ -35,32 +35,42 @@ if [ ${MODE} = "lite_train_infer" ];then
# pretrain lite train data
wget
-nc
-P
./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams
rm
-rf
./train_data/icdar2015
rm
-rf
./train_data/ic15_data
wget
-nc
-P
./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015_lite.tar
cd
./train_data/
&&
tar
xf icdar2015_lite.tar
wget
-nc
-P
./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar
# todo change to bcebos
cd
./train_data/
&&
tar
xf icdar2015_lite.tar
&&
tar
xf ic15_data.tar
ln
-s
./icdar2015_lite ./icdar2015
cd
../
elif
[
${
MODE
}
=
"whole_train_infer"
]
;
then
wget
-nc
-P
./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams
rm
-rf
./train_data/icdar2015
rm
-rf
./train_data/ic15_data
wget
-nc
-P
./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015.tar
cd
./train_data/
&&
tar
xf icdar2015.tar
&&
cd
../
wget
-nc
-P
./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar
cd
./train_data/
&&
tar
xf icdar2015.tar
&&
tar
xf ic15_data.tar
&&
cd
../
elif
[
${
MODE
}
=
"whole_infer"
]
;
then
wget
-nc
-P
./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams
rm
-rf
./train_data/icdar2015
rm
-rf
./train_data/ic15_data
wget
-nc
-P
./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015_infer.tar
cd
./train_data/
&&
tar
xf icdar2015_infer.tar
wget
-nc
-P
./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar
cd
./train_data/
&&
tar
xf icdar2015_infer.tar
&&
tar
xf ic15_data.tar
ln
-s
./icdar2015_infer ./icdar2015
cd
../
else
rm
-rf
./train_data/icdar2015
if
[[
${
model_name
}
=
"ocr_det"
]]
;
then
wget
-nc
-P
./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar
if
[
${
model_name
}
=
"ocr_det"
]
;
then
eval_model_name
=
"ch_ppocr_mobile_v2.0_det_infer"
rm
-rf
./train_data/icdar2015
wget
-nc
-P
./train_data https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar
wget
-nc
-P
./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar
cd
./inference
&&
tar
xf
${
eval_model_name
}
.tar
&&
tar
xf ch_det_data_50.tar
&&
cd
../
else
eval_model_name
=
"ch_ppocr_mobile_v2.0_rec_train"
wget
-nc
-P
./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar
cd
./inference
&&
tar
xf
${
eval_model_name
}
.tar
&&
cd
../
rm
-rf
./train_data/ic15_data
eval_model_name
=
"ch_ppocr_mobile_v2.0_rec_infer"
wget
-nc
-P
./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar
wget
-nc
-P
./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar
cd
./inference
&&
tar
xf
${
eval_model_name
}
.tar
&&
tar
xf ic15_data.tar
&&
cd
../
fi
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录