diff --git "a/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/ReID_pth2onnx.py" "b/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/ReID_pth2onnx.py" index 659451d4ade18d31b45aecf33889d3b548e4c5ba..e60ef845379e86bf4051c3f27182adcb091a37d9 100644 --- "a/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/ReID_pth2onnx.py" +++ "b/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/ReID_pth2onnx.py" @@ -54,7 +54,7 @@ def main(): output_names = ["class"] dynamic_axes = {'image': {0: '-1'}, 'class': {0: '-1'}} dummy_input = torch.randn(1, 3, 256, 128) - export_onnx_file = "ReID.onnx" + export_onnx_file = "ReID_dybs.onnx" torch.onnx.export(model, dummy_input, export_onnx_file, input_names=input_names, dynamic_axes=dynamic_axes, output_names=output_names, opset_version=11, verbose=True) diff --git "a/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/aipp_ReID_test.sh" "b/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/aipp_ReID_test.sh" index a6ebcbae9ca46083a4fcb7b206ebf169afd96d41..f9dee8b657f5498c74efcd8005cdfd06d842ed2b 100644 --- "a/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/aipp_ReID_test.sh" +++ "b/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/aipp_ReID_test.sh" @@ -1,6 +1,6 @@ #! /bin/bash -atc --framework=5 --model=./ReID.onnx --input_format=NCHW --input_shape="image:1,3,256,128" --output=ReID_aipp_bs1 --log=debug --soc_version=Ascend310 --insert_op_conf=./aipp_ReID_pth.config +atc --framework=5 --model=./ReID_dybs.onnx --input_format=NCHW --input_shape="image:1,3,256,128" --output=ReID_aipp_bs1 --log=debug --soc_version=Ascend310 --insert_op_conf=./aipp_ReID_pth.config ln -s /root/datasets/market1501 ./market1501 python3.7 gen_dataset_info.py jpg ./market1501/query ./market1501_query.info diff --git "a/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/pth2om.sh" "b/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/pth2om.sh" index 393275a3c0ecde085fcc643e29e828d28d81dd67..8033c59eaf1d2d2587e9828ea237832bedab3b43 100644 --- "a/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/pth2om.sh" +++ "b/Ascend-PyTorch\347\246\273\347\272\277\346\216\250\347\220\206\346\214\207\345\257\274/ONNX\346\250\241\345\236\213\346\216\250\347\220\206\346\214\207\345\257\274/official/cv/ReID/ReID-strong-baseline/test/pth2om.sh" @@ -1,6 +1,6 @@ #!/bin/bash -rm -rf ReID.onnx +rm -rf ReID_dybs.onnx python3.7 ReID_pth2onnx.py --config_file='reid-strong-baseline/configs/softmax_triplet_with_center.yml' MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('market_resnet50_model_120_rank1_945.pth')" TEST.NECK_FEAT "('before')" TEST.FEAT_NORM "('no')" if [ $? != 0 ]; then echo "fail!" @@ -9,8 +9,8 @@ fi rm -rf ReID_bs1.om ReID_bs16.om source env.sh -atc --framework=5 --model=ReID.onnx --output=ReID_bs1 --input_format=NCHW --input_shape="image:1,3,256,128" --log=debug --soc_version=Ascend310 -atc --framework=5 --model=ReID.onnx --output=ReID_bs16 --input_format=NCHW --input_shape="image:16,3,256,128" --log=debug --soc_version=Ascend310 --auto_tune_mode="RL,GA" +atc --framework=5 --model=ReID_dybs.onnx --output=ReID_bs1 --input_format=NCHW --input_shape="image:1,3,256,128" --log=debug --soc_version=Ascend310 +atc --framework=5 --model=ReID_dybs.onnx --output=ReID_bs16 --input_format=NCHW --input_shape="image:16,3,256,128" --log=debug --soc_version=Ascend310 --auto_tune_mode="RL,GA" if [ -f "ReID_bs1.om" ] && [ -f "ReID_bs16.om" ]; then echo "success"