Skip to content
Snippets Groups Projects
Commit bbae380b authored by GongLiyao's avatar GongLiyao
Browse files

Change 'pip3.7' to 'pip' in the scripts of Ascend310 inference.

parent e13f116a
No related branches found
No related tags found
No related merge requests found
Showing
with 30 additions and 30 deletions
......@@ -75,7 +75,7 @@ function infer()
rm -rf ./testdata
fi
mkdir testdata
python3 ../ascend310_infer/310infer_preprocess.py $datapath
python ../ascend310_infer/310infer_preprocess.py $datapath
if [ -d output ]; then
rm -rf ./output
fi
......
......@@ -25,5 +25,5 @@ if [ -f "Makefile" ]; then
fi
cmake .. \
-DMINDSPORE_PATH="`pip3.7 show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
-DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
make
......@@ -76,7 +76,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 ../preprocess.py --batch_size 1
python ../preprocess.py --batch_size 1
}
function compile_app()
......@@ -104,9 +104,9 @@ function infer()
function cal_acc()
{
if [ "$dataset" == "HMDB51" ]; then
python3.7 ../postprocess.py --batch_size 1 &> acc.log
python ../postprocess.py --batch_size 1 &> acc.log
else
python3.7 ../postprocess.py --num_classes 101 --batch_size 1 &> acc.log
python ../postprocess.py --num_classes 101 --batch_size 1 &> acc.log
fi
}
......
......@@ -80,7 +80,7 @@ function infer()
function cal_acc()
{
cd .. || exit
python3.7 postprocess.py --result_path=./scripts/result_Files &> ./acc.log &
python postprocess.py --result_path=./scripts/result_Files &> ./acc.log &
}
......
......@@ -15,6 +15,6 @@
# ============================================================================
mkdir build
cd build
cmake . -DMINDSPORE_PATH="`pip3.7 show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
make
cd ..
\ No newline at end of file
......@@ -25,5 +25,5 @@ if [ -f "Makefile" ]; then
fi
cmake .. \
-DMINDSPORE_PATH="`pip3.7 show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
-DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
make
......@@ -77,7 +77,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 ../preprocess.py --dataset_name=$dataset_name --data_path=$dataset_path & #--result_path=./preprocess_Result/
python ../preprocess.py --dataset_name=$dataset_name --data_path=$dataset_path & #--result_path=./preprocess_Result/
}
function compile_app()
......@@ -103,7 +103,7 @@ function infer()
function cal_acc()
{
python3.7 ../postprocess.py --dataset_name=$dataset_name &> acc.log
python ../postprocess.py --dataset_name=$dataset_name &> acc.log
}
if [ $need_preprocess == "y" ]; then
......
......@@ -76,7 +76,7 @@ function preprocess_data() {
mkdir ./img/$category/infer
mkdir ./img/$category/label
python3.7 ../preprocess.py \
python ../preprocess.py \
--data_dir $dataset_path \
--img_dir ./img \
--category $category
......@@ -119,7 +119,7 @@ function infer() {
}
function cal_acc() {
python3 ../postprocess.py \
python ../postprocess.py \
--result_dir ./img/$category/result/ \
--img_dir ./img/$category/infer/ \
--label_dir ./img/$category/label/ \
......
......@@ -77,7 +77,7 @@ function infer()
function cal_acc()
{
python3.7 ../postprocess.py --result_path=./result_Files --label_path=$label_path &> acc.log &
python ../postprocess.py --result_path=./result_Files --label_path=$label_path &> acc.log &
}
compile_app
......
......@@ -77,7 +77,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 ../preprocess.py --dataset_name=$dataset_name --data_path=$dataset_path & #--result_path=./preprocess_Result/
python ../preprocess.py --dataset_name=$dataset_name --data_path=$dataset_path & #--result_path=./preprocess_Result/
}
function compile_app()
......@@ -103,7 +103,7 @@ function infer()
function cal_acc()
{
python3.7 ../postprocess.py --dataset_name=$dataset_name &> acc.log
python ../postprocess.py --dataset_name=$dataset_name &> acc.log
}
if [ $need_preprocess == "y" ]; then
......
......@@ -25,5 +25,5 @@ if [ -f "Makefile" ]; then
fi
cmake .. \
-DMINDSPORE_PATH="`pip3.7 show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
-DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
make
......@@ -66,7 +66,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 ../preprocess.py --preprocess_path=./preprocess_Result &> preprocess.log
python ../preprocess.py --preprocess_path=./preprocess_Result &> preprocess.log
if [ $? -ne 0 ]; then
echo "preprocess data failed"
exit 1
......
......@@ -25,5 +25,5 @@ if [ -f "Makefile" ]; then
fi
cmake .. \
-DMINDSPORE_PATH="`pip3.7 show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
-DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
make
......@@ -68,7 +68,7 @@ function preprocess_data()
if [ -d ./data_bin ]; then
rm -rf ./data_bin
fi
python3.7 ../data_to_bin.py --dataset_path=$data_path &> preprocess.log
python ../data_to_bin.py --dataset_path=$data_path &> preprocess.log
}
function compile_app()
......
......@@ -57,7 +57,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 ../preprocess.py --content_path $content_path --style_path $style_path --output_path='./preprocess_Result/'
python ../preprocess.py --content_path $content_path --style_path $style_path --output_path='./preprocess_Result/'
}
function compile_app()
{
......@@ -90,7 +90,7 @@ function post_process()
rm -rf ./postprocess_Result_interpolation
fi
mkdir postprocess_Result_interpolation
python3.7 ../postprocess.py --bin_path='./result_Files' --output_dir='./postprocess_Result/' --output_dir_interpolation='./postprocess_Result_interpolation/' &> postprocess.log
python ../postprocess.py --bin_path='./result_Files' --output_dir='./postprocess_Result/' --output_dir_interpolation='./postprocess_Result_interpolation/' &> postprocess.log
}
preprocess_data
......
......@@ -59,7 +59,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 ../preprocess.py --data_path=$dataset_path
python ../preprocess.py --data_path=$dataset_path
}
function compile_app()
......@@ -85,7 +85,7 @@ function infer()
function cal_acc()
{
python3.7 ../postprocess.py &> acc.log
python ../postprocess.py &> acc.log
}
preprocess_data
......
......@@ -66,7 +66,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 ../preprocess.py --output_path='./preprocess_Result/'
python ../preprocess.py --output_path='./preprocess_Result/'
}
function compile_app()
{
......@@ -96,7 +96,7 @@ function post_process()
rm -rf ./postprocess_Result
fi
mkdir postprocess_Result
python3.7 ../postprocess.py --output_path='./postprocess_Result/'
python ../postprocess.py --output_path='./postprocess_Result/'
}
preprocess_data
......
......@@ -25,5 +25,5 @@ if [ -f "Makefile" ]; then
fi
cmake .. \
-DMINDSPORE_PATH="`pip3.7 show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
-DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
make
......@@ -83,7 +83,7 @@ function preprocess_data()
rm -rf ./preprocess_Result
fi
mkdir preprocess_Result
python3.7 preprocess.py --dataroot=$dataset_path --data_dir=$dataset_mode --outputs_dir=./preprocess_Result/ >& preprocess.log
python preprocess.py --dataroot=$dataset_path --data_dir=$dataset_mode --outputs_dir=./preprocess_Result/ >& preprocess.log
}
function compile_app()
......@@ -114,7 +114,7 @@ function generate_img()
rm -rf ./infer_output_img
fi
mkdir infer_output_img
python3.7 postprocess.py --dataroot=./result_Files --outputs_dir=./infer_output_img --device_id=$device_id &> acc.log
python postprocess.py --dataroot=./result_Files --outputs_dir=./infer_output_img --device_id=$device_id &> acc.log
}
if [ $need_preprocess == "y" ]; then
......
......@@ -65,7 +65,7 @@ function preprocess_data()
fi
mkdir bin_data
cd $scripts_path
python3.7 ../preprocess.py --data_url=$data_path &> preprocess.log
python ../preprocess.py --data_url=$data_path &> preprocess.log
}
function compile_app()
......@@ -96,7 +96,7 @@ function infer()
function postprocess()
{
cd $scripts_path
python3.7 ../postprocess.py --result_path='./result_Files' --ori_path='../bin_data/label' &> postprocess.log
python ../postprocess.py --result_path='./result_Files' --ori_path='../bin_data/label' &> postprocess.log
}
preprocess_data
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment