[Bug Fix] Fix bugs in publish task scripts (#693)

* Fix release_task cpp_run.sh

 Author:    felixhjh <852142024@qq.com>
 Date:      Thu Nov 10 07:26:48 2022 +0000

* Add option for infer_ppyoloe.cc

  author:    felixhjh <852142024@qq.com>

* Fix bug in release task scripts

* Add error check function

* Format code

* Add new download dir for release version

* Fix precision diff for osx-arm64

Co-authored-by: root <root@bjyz-sys-gpu-kongming2.bjyz.baidu.com>
This commit is contained in:
huangjianhui
2022-11-24 18:51:13 +08:00
committed by GitHub
parent 0d68d8a8cc
commit c18a9e32f9
3 changed files with 17 additions and 12 deletions

View File

@@ -3,31 +3,31 @@ import re
diff_score_threshold = {
"linux-x64": {
"label_diff": 1e-02,
"label_diff": 0,
"score_diff": 1e-4,
"boxes_diff_ratio": 1e-4,
"boxes_diff": 1e-3
},
"linux-aarch64": {
"label_diff": 1e-02,
"label_diff": 0,
"score_diff": 1e-4,
"boxes_diff_ratio": 1e-4,
"boxes_diff": 1e-3
},
"osx-x86_64": {
"label_diff": 1e-02,
"label_diff": 0,
"score_diff": 1e-4,
"boxes_diff_ratio": 2e-4,
"boxes_diff": 1e-3
},
"osx-arm64": {
"label_diff": 1e-02,
"score_diff": 1e-4,
"boxes_diff_ratio": 2e-4,
"label_diff": 0,
"score_diff": 1e-3,
"boxes_diff_ratio": 5e-4,
"boxes_diff": 1e-3
},
"win-x64": {
"label_diff": 1e-02,
"label_diff": 0,
"score_diff": 5e-4,
"boxes_diff_ratio": 1e-3,
"boxes_diff": 1e-3
@@ -133,7 +133,7 @@ def check_result(gt_result, infer_result, args):
is_diff = True
boxes_diff_bool_file = args.platform + "_" + backend + "_" + "boxes_diff_bool.txt"
boxes_diff_ratio_file = args.platform + "_" + backend + "_" + "boxes_diff_ratio.txt"
boxes_diff_ratio_bool_file = args.platform + "_" + backend + "_" + "boxes_diff_ratio_bool"
boxes_diff_ratio_bool_file = args.platform + "_" + backend + "_" + "boxes_diff_ratio_bool.txt"
save_numpy_result(boxes_diff_bool_file,
boxes_diff > boxes_diff_threshold)
save_numpy_result(boxes_diff_ratio_file, boxes_diff_ratio)

View File

@@ -19,7 +19,7 @@ LINUX_X64_GPU_CASE=('ort' 'paddle' 'trt')
LINUX_X64_CPU_CASE=('ort' 'paddle' 'openvino')
#LINUX_AARCH_CPU_CASE=('ort' 'openvino')
LINUX_AARCH_CPU_CASE=('ort')
MACOS_INTEL_CPU_CASE=('ort' 'paddle' 'openvino')
MACOS_INTEL_CPU_CASE=('ort' 'openvino')
MACOS_ARM64_CPU_CASE=('default')
wget -q https://bj.bcebos.com/paddlehub/fastdeploy/ppyoloe_crn_l_300e_coco.tgz
wget -q https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg

View File

@@ -14,7 +14,7 @@ LINUX_X64_GPU_CASE=('ort' 'paddle' 'trt')
LINUX_X64_CPU_CASE=('ort' 'paddle' 'openvino')
#LINUX_AARCH_CPU_CASE=('ort' 'openvino')
LINUX_AARCH_CPU_CASE=('ort')
MACOS_INTEL_CPU_CASE=('ort' 'paddle' 'openvino')
MACOS_INTEL_CPU_CASE=('ort' 'openvino')
MACOS_ARM64_CPU_CASE=('default')
wget -q https://bj.bcebos.com/paddlehub/fastdeploy/ppyoloe_crn_l_300e_coco.tgz
wget -q https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg
@@ -54,8 +54,13 @@ do
echo "Python Backend:" $backend
if [ "$backend" != "trt" ];then
python infer_ppyoloe.py --model_dir $MODEL_PATH --image $IMAGE_PATH --device cpu --backend $backend >> py_$backend\_cpu_result.txt
python $COMPARE_SHELL --gt_path $GROUND_TRUTH_PATH --result_path py_$backend\_cpu_result.txt --platform $PLATFORM --device cpu
check_ret
if [ "$PLATFORM" = "osx-arm64"]
python $COMPARE_SHELL --gt_path $GROUND_TRUTH_PATH --result_path py_$backend\_cpu_result.txt --platform $PLATFORM --device cpu --conf_threshold 0.5
check_ret
else
python $COMPARE_SHELL --gt_path $GROUND_TRUTH_PATH --result_path py_$backend\_cpu_result.txt --platform $PLATFORM --device cpu
check_ret
fi
fi
if [ "$DEVICE" = "gpu" ];then