Skip to content

Commit

Permalink
update pretrain for benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
changdazhou committed Sep 8, 2024
1 parent 5b54ac4 commit 1288219
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test_tipc/configs/slanet/train_infer_python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ train_infer_img_dir:./ppstructure/docs/table/table.jpg
null:null
##
trainer:norm_train
norm_train:tools/train.py -c configs/table/SLANet.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/pubtabnet/train Train.dataset.label_file_list=[./train_data/pubtabnet/train.jsonl] Eval.dataset.data_dir=./train_data/pubtabnet/test Eval.dataset.label_file_list=[./train_data/pubtabnet/test.jsonl]
norm_train:tools/train.py -c configs/table/SLANet_ch.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/pubtabnet Train.dataset.label_file_list=[./train_data/pubtabnet/train.txt] Eval.dataset.data_dir=./train_data/pubtabnet Eval.dataset.label_file_list=[./train_data/pubtabnet/val.txt]
pact_train:null
fpgm_train:null
distill_train:null
Expand Down
18 changes: 11 additions & 7 deletions test_tipc/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ if [ ${MODE} = "benchmark_train" ];then
fi
fi
if [[ ${model_name} =~ "ch_PP-OCRv4_mobile_det" ]];then
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/PPLCNetV3_x0_75_ocr_det.pdparams --no-check-certificate
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/ch_PP-OCRv4_det_trained.pdparams --no-check-certificate
rm -rf ./train_data/icdar2015
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/icdar2015_benckmark.tar --no-check-certificate
cd ./train_data/ && tar xf icdar2015_benckmark.tar
ln -s ./icdar2015_benckmark ./icdar2015
cd ../
fi
if [[ ${model_name} =~ "ch_PP-OCRv4_server_det" ]];then
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/PPHGNet_small_ocr_det.pdparams --no-check-certificate
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/ch_PP-OCRv4_det_server_trained.pdparams --no-check-certificate
rm -rf ./train_data/icdar2015
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/icdar2015_benckmark.tar --no-check-certificate
cd ./train_data/ && tar xf icdar2015_benckmark.tar
Expand Down Expand Up @@ -144,12 +144,16 @@ if [ ${MODE} = "benchmark_train" ];then
cd ../
fi
if [[ ${model_name} == "slanet" ]];then
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/en_ppstructure_mobile_v2.0_SLANet_train.tar --no-check-certificate
cd ./pretrain_models/ && tar xf en_ppstructure_mobile_v2.0_SLANet_train.tar && cd ../
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/ch_ppstructure_mobile_v2.0_SLANet_train.tar --no-check-certificate
cd ./pretrain_models/ && tar xf ch_ppstructure_mobile_v2.0_SLANet_train.tar && cd ../
rm -rf ./train_data/pubtabnet
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/pubtabnet_benckmark.tar --no-check-certificate
cd ./train_data/ && tar xf pubtabnet_benckmark.tar
ln -s ./pubtabnet_benckmark ./pubtabnet
wget -nc -P ./train_data/ https://paddle-model-ecology.bj.bcebos.com/uapi/data/table_rec_dataset_examples.tar --no-check-certificate
cd ./train_data/ && tar xf table_rec_dataset_examples.tar
ln -s ./table_rec_dataset_examples ./pubtabnet
cd pubtabnet
for i in `seq 10`;do cp train.txt dup$i.txt;done
cat dup* > train.txt && rm -rf dup*
cd ../
cd ../
fi
if [[ ${model_name} == "det_r50_dcn_fce_ctw_v2_0" ]]; then
Expand Down

0 comments on commit 1288219

Please sign in to comment.