diff --git a/configs/det/det_r50_vd_sast_icdar15.yml b/configs/det/det_r50_vd_sast_icdar15.yml index dbfcefca964e73d42298fbbbc1e654b3bd809c77..674de7fbf250bd712b46e04d42ff0022029fd095 100755 --- a/configs/det/det_r50_vd_sast_icdar15.yml +++ b/configs/det/det_r50_vd_sast_icdar15.yml @@ -8,7 +8,7 @@ Global: # evaluation is run every 5000 iterations after the 4000th iteration eval_batch_step: [4000, 5000] cal_metric_during_train: False - pretrained_model: ./pretrain_models/ResNet50_vd_ssld_pretrained/ + pretrained_model: ./pretrain_models/ResNet50_vd_ssld_pretrained checkpoints: save_inference_dir: use_visualdl: False diff --git a/configs/det/det_r50_vd_sast_totaltext.yml b/configs/det/det_r50_vd_sast_totaltext.yml index 88dd31f3c21b184d956ad718dae808bb6054532e..44a0766b1bf2790a9633602bc637932529046e34 100755 --- a/configs/det/det_r50_vd_sast_totaltext.yml +++ b/configs/det/det_r50_vd_sast_totaltext.yml @@ -8,7 +8,7 @@ Global: # evaluation is run every 5000 iterations after the 4000th iteration eval_batch_step: [4000, 5000] cal_metric_during_train: False - pretrained_model: ./pretrain_models/ResNet50_vd_ssld_pretrained/ + pretrained_model: ./pretrain_models/ResNet50_vd_ssld_pretrained checkpoints: save_inference_dir: use_visualdl: False diff --git a/test_tipc/prepare.sh b/test_tipc/prepare.sh index f3ad242538a9471af237c804eae343da06e2b9dd..9b63bf5b20cd08b4ab08c17d7fd84f53feb93967 100644 --- a/test_tipc/prepare.sh +++ b/test_tipc/prepare.sh @@ -87,7 +87,8 @@ elif [ ${MODE} = "whole_infer" ];then rm -rf ./train_data/icdar2015 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/ch/ch_ppocr_mobile_v2.0_det_train.tar --no-check-certificate - cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../ + wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate + cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && cd ../ elif [ ${model_name} = "ocr_server_det" ]; then wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_train.tar --no-check-certificate wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 58170e393cdc9d8441408a89c84aa6f88d683db3..98bf0362f6842cb70490e6817ef53fe39109f406 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -205,7 +205,7 @@ def create_predictor(args, mode, logger): "nearest_interp_v2_0.tmp_0": [1, 256, 2, 2] } max_input_shape = { - "x": [1, 3, 2000, 2000], + "x": [1, 3, 1280, 1280], "conv2d_92.tmp_0": [1, 120, 400, 400], "conv2d_91.tmp_0": [1, 24, 200, 200], "conv2d_59.tmp_0": [1, 96, 400, 400], @@ -255,16 +255,16 @@ def create_predictor(args, mode, logger): opt_input_shape.update(opt_pact_shape) elif mode == "rec": min_input_shape = {"x": [1, 3, 32, 10]} - max_input_shape = {"x": [args.rec_batch_num, 3, 32, 2000]} + max_input_shape = {"x": [args.rec_batch_num, 3, 32, 1024]} opt_input_shape = {"x": [args.rec_batch_num, 3, 32, 320]} elif mode == "cls": min_input_shape = {"x": [1, 3, 48, 10]} - max_input_shape = {"x": [args.rec_batch_num, 3, 48, 2000]} + max_input_shape = {"x": [args.rec_batch_num, 3, 48, 1024]} opt_input_shape = {"x": [args.rec_batch_num, 3, 48, 320]} else: min_input_shape = {"x": [1, 3, 10, 10]} - max_input_shape = {"x": [1, 3, 1000, 1000]} - opt_input_shape = {"x": [1, 3, 500, 500]} + max_input_shape = {"x": [1, 3, 512, 512]} + opt_input_shape = {"x": [1, 3, 256, 256]} config.set_trt_dynamic_shape_info(min_input_shape, max_input_shape, opt_input_shape)