From aeb79a830562d7d06d92161fdc60bdffbd3291cc Mon Sep 17 00:00:00 2001 From: "hongliang.yuan" Date: Fri, 11 Oct 2024 08:34:28 +0000 Subject: [PATCH] use current dir as run path --- models/cv/classification/densenet169/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/densenet169/ixrt/README.md b/models/cv/classification/densenet169/ixrt/README.md index 8afb8971..6abd12c0 100644 --- a/models/cv/classification/densenet169/ixrt/README.md +++ b/models/cv/classification/densenet169/ixrt/README.md @@ -32,21 +32,21 @@ Dataset: to download the validation dat ```bash python3 export.py --weight densenet169-b2777c0a.pth --output densenet169.onnx -cd data && mkdir checkpoints && cd checkpoints && mkdir densenet169 -mv densenet169.onnx densenet169 ``` ## Inference +```bash +export DATASETS_DIR=/Path/to/imagenet_val/ +``` ### FP16 ```bash -cd deepsparkinference # Accuracy -bash models/cv/classification/densenet169/ixrt/scripts/infer_densenet_fp16_accuracy.sh +bash scripts/infer_densenet_fp16_accuracy.sh # Performance -bash models/cv/classification/densenet169/ixrt/scripts/infer_densenet_fp16_performance.sh +bash scripts/infer_densenet_fp16_performance.sh ``` ## Results diff --git a/models/cv/classification/densenet169/ixrt/scripts/infer_densenet_fp16_accuracy.sh b/models/cv/classification/densenet169/ixrt/scripts/infer_densenet_fp16_accuracy.sh index 78721dd8..eb17c406 100644 --- a/models/cv/classification/densenet169/ixrt/scripts/infer_densenet_fp16_accuracy.sh +++ b/models/cv/classification/densenet169/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/densenet169/" -RUN_DIR="${PROJ_DIR}/models/cv/classification/densenet169/ixrt/" -CONFIG_DIR="${PROJ_DIR}/models/cv/classification/densenet169/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/densenet169/ixrt/scripts/infer_densenet_fp16_performance.sh b/models/cv/classification/densenet169/ixrt/scripts/infer_densenet_fp16_performance.sh index e7c087bf..f09ccfcc 100644 --- a/models/cv/classification/densenet169/ixrt/scripts/infer_densenet_fp16_performance.sh +++ b/models/cv/classification/densenet169/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/densenet169/" -RUN_DIR="${PROJ_DIR}/models/cv/classification/densenet169/ixrt/" -CONFIG_DIR="${PROJ_DIR}/models/cv/classification/densenet169/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