From beed28977c322ffa86ebc31e6205af68edfaf1fb Mon Sep 17 00:00:00 2001 From: "hongliang.yuan" Date: Fri, 11 Oct 2024 08:47:29 +0000 Subject: [PATCH] use current dir as run path --- models/cv/classification/densenet161/ixrt/README.md | 10 +++++----- .../ixrt/scripts/infer_densenet_fp16_accuracy.sh | 10 +++++----- .../ixrt/scripts/infer_densenet_fp16_performance.sh | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/models/cv/classification/densenet161/ixrt/README.md b/models/cv/classification/densenet161/ixrt/README.md index 08e7bd16..cb65f64a 100644 --- a/models/cv/classification/densenet161/ixrt/README.md +++ b/models/cv/classification/densenet161/ixrt/README.md @@ -31,21 +31,21 @@ Dataset: to download the validation dat ```bash python3 export.py --weight densenet161-8d451a50.pth --output densenet161.onnx -cd data && mkdir checkpoints && cd checkpoints && mkdir densenet161 -mv densenet161.onnx densenet161 ``` ## Inference +```bash +export DATASETS_DIR=/Path/to/imagenet_val/ +``` ### FP16 ```bash -cd deepsparkinference # Accuracy -bash models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_accuracy.sh +bash scripts/infer_densenet_fp16_accuracy.sh # Performance -bash models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_performance.sh +bash scripts/infer_densenet_fp16_performance.sh ``` ## Results diff --git a/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_accuracy.sh b/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_accuracy.sh index e266c65a..dfaf40d7 100644 --- a/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_accuracy.sh +++ b/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_accuracy.sh @@ -42,11 +42,11 @@ do esac done -PROJ_DIR=$(cd $(dirname $0);cd ../../../../../..; pwd) -DATASETS_DIR="${PROJ_DIR}/data/datasets/imagenet_val/" -CHECKPOINTS_DIR="${PROJ_DIR}/data/checkpoints/densenet161/" -RUN_DIR="${PROJ_DIR}/models/cv/classification/densenet161/ixrt/" -CONFIG_DIR="${PROJ_DIR}/models/cv/classification/densenet161/ixrt/config/DENSENET_CONFIG" +PROJ_DIR=${PROJ_DIR:-"."} +DATASETS_DIR="${DATASETS_DIR}" +CHECKPOINTS_DIR="${PROJ_DIR}" +RUN_DIR="${PROJ_DIR}" +CONFIG_DIR="${PROJ_DIR}/config/DENSENET_CONFIG" source ${CONFIG_DIR} ORIGINE_MODEL=${CHECKPOINTS_DIR}/${ORIGINE_MODEL} diff --git a/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_performance.sh b/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_performance.sh index cc0816ef..f09ccfcc 100644 --- a/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_performance.sh +++ b/models/cv/classification/densenet161/ixrt/scripts/infer_densenet_fp16_performance.sh @@ -42,11 +42,11 @@ do esac done -PROJ_DIR=$(cd $(dirname $0);cd ../../../../../..; pwd) -DATASETS_DIR="${PROJ_DIR}/data/datasets/imagenet_val/" -CHECKPOINTS_DIR="${PROJ_DIR}/data/checkpoints/densenet161/" -RUN_DIR="${PROJ_DIR}/models/cv/classification/densenet161/ixrt/" -CONFIG_DIR="${PROJ_DIR}/models/cv/classification/densenet161/ixrt/config/DENSENET_CONFIG" +PROJ_DIR=${PROJ_DIR:-"."} +DATASETS_DIR="${DATASETS_DIR}" +CHECKPOINTS_DIR="${PROJ_DIR}" +RUN_DIR="${PROJ_DIR}" +CONFIG_DIR="${PROJ_DIR}/config/DENSENET_CONFIG" source ${CONFIG_DIR} ORIGINE_MODEL=${CHECKPOINTS_DIR}/${ORIGINE_MODEL} -- Gitee