mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-11-13 00:23:30 +00:00
add pgnet to tipc
This commit is contained in:
parent
4b64148d94
commit
23b46e71a6
51
test_tipc/configs/en_server_pgnetA/train_infer_python.txt
Normal file
51
test_tipc/configs/en_server_pgnetA/train_infer_python.txt
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
===========================train_params===========================
|
||||||
|
model_name:en_pgnetA
|
||||||
|
python:python3.7
|
||||||
|
gpu_list:0|0,1
|
||||||
|
Global.use_gpu:True|True
|
||||||
|
Global.auto_cast:null
|
||||||
|
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=500
|
||||||
|
Global.save_model_dir:./output/
|
||||||
|
Train.loader.batch_size_per_card:lite_train_lite_infer=2|whole_train_whole_infer=14
|
||||||
|
Global.pretrained_model:null
|
||||||
|
train_model_name:latest
|
||||||
|
train_infer_img_dir:./train_data/total_text/test/rgb/
|
||||||
|
null:null
|
||||||
|
##
|
||||||
|
trainer:norm_train
|
||||||
|
norm_train:tools/train.py -c configs/e2e/e2e_r50_vd_pg.yml -o Global.pretrained_model=./pretrain_models/en_server_pgnetA/best_accuracy
|
||||||
|
pact_train:null
|
||||||
|
fpgm_train:null
|
||||||
|
distill_train:null
|
||||||
|
null:null
|
||||||
|
null:null
|
||||||
|
##
|
||||||
|
===========================eval_params===========================
|
||||||
|
eval:null
|
||||||
|
null:null
|
||||||
|
##
|
||||||
|
===========================infer_params===========================
|
||||||
|
Global.save_inference_dir:./output/
|
||||||
|
Global.pretrained_model:
|
||||||
|
norm_export:tools/export_model.py -c configs/e2e/e2e_r50_vd_pg.yml -o
|
||||||
|
quant_export:null
|
||||||
|
fpgm_export:null
|
||||||
|
distill_export:null
|
||||||
|
export1:null
|
||||||
|
export2:null
|
||||||
|
inference_dir:null
|
||||||
|
train_model:./inference/en_server_pgnetA/best_accuracy
|
||||||
|
infer_export:tools/export_model.py -c configs/e2e/e2e_r50_vd_pg.yml -o
|
||||||
|
infer_quant:False
|
||||||
|
inference:tools/infer/predict_e2e.py
|
||||||
|
--use_gpu:True|False
|
||||||
|
--enable_mkldnn:True|False
|
||||||
|
--cpu_threads:1|6
|
||||||
|
--rec_batch_num:1
|
||||||
|
--use_tensorrt:False|True
|
||||||
|
--precision:fp32|fp16|int8
|
||||||
|
--det_model_dir:
|
||||||
|
--image_dir:./inference/ch_det_data_50/all-sum-510/
|
||||||
|
null:null
|
||||||
|
--benchmark:True
|
||||||
|
null:null
|
||||||
@ -41,6 +41,12 @@ if [ ${MODE} = "lite_train_lite_infer" ];then
|
|||||||
ln -s ./icdar2015_lite ./icdar2015
|
ln -s ./icdar2015_lite ./icdar2015
|
||||||
cd ../
|
cd ../
|
||||||
cd ./inference && tar xf rec_inference.tar && cd ../
|
cd ./inference && tar xf rec_inference.tar && cd ../
|
||||||
|
if [ ${model_name} == "en_pgnetA" ]; then
|
||||||
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/total_text_lite.tar --no-check-certificate
|
||||||
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/pgnet/en_server_pgnetA.tar --no-check-certificate
|
||||||
|
cd ./pretrain_models/ && tar xf en_server_pgnetA.tar && cd ../
|
||||||
|
cd ./train_data && tar xf total_text_lite.tar && ln -s total_text && cd ../
|
||||||
|
fi
|
||||||
elif [ ${MODE} = "whole_train_whole_infer" ];then
|
elif [ ${MODE} = "whole_train_whole_infer" ];then
|
||||||
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams --no-check-certificate
|
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams --no-check-certificate
|
||||||
rm -rf ./train_data/icdar2015
|
rm -rf ./train_data/icdar2015
|
||||||
@ -107,6 +113,11 @@ elif [ ${MODE} = "whole_infer" ];then
|
|||||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
||||||
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../
|
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../
|
||||||
fi
|
fi
|
||||||
|
elif [ ${model_name} = "PPOCRv2_ocr_det" ]; then
|
||||||
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
||||||
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/pgnet/e2e_server_pgnetA_infer.tar --no-check-certificate
|
||||||
|
cd ./inference && tar xf e2e_server_pgnetA_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ${MODE} = "klquant_whole_infer" ]; then
|
if [ ${MODE} = "klquant_whole_infer" ]; then
|
||||||
if [ ${model_name} = "ocr_det" ]; then
|
if [ ${model_name} = "ocr_det" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user