Network="SSD-MobileNetV1"
batch_size=32
export RANK_SIZE=1
data_path=""
pth_path=""
workers=4
for para in $*
do
if [[ $para == --workers* ]];then
workers=`echo ${para#*=}`
elif [[ $para == --data_path* ]];then
data_path=`echo ${para#*=}`
elif [[ $para == --pth_path* ]];then
pth_path=`echo ${para#*=}`
fi
done
if [[ $data_path == "" ]];then
echo "[Error] para \"data_path\" must be confing"
exit 1
fi
if [[ $pth_path == "" ]];then
echo "[Error] para \"pth_path\" must be confing"
exit 1
fi
cur_path=`pwd`
cur_path_last_diename=${cur_path##*/}
if [ x"${cur_path_last_diename}" == x"test" ];then
test_path_dir=${cur_path}
cd ..
cur_path=`pwd`
else
test_path_dir=${cur_path}/test
fi
ASCEND_DEVICE_ID=0
if [ -d ${test_path_dir}/output/${ASCEND_DEVICE_ID} ];then
rm -rf ${test_path_dir}/output/${ASCEND_DEVICE_ID}
mkdir -p ${test_path_dir}/output/$ASCEND_DEVICE_ID
else
mkdir -p ${test_path_dir}/output/$ASCEND_DEVICE_ID
fi
start_time=$(date +%s)
check_etp_flag=`env | grep etp_running_flag`
etp_flag=`echo ${check_etp_flag#*=}`
if [ x"${etp_flag}" != x"true" ];then
source ${test_path_dir}/env_npu.sh
fi
python3 ./eval_ssd.py \
--dataset=${data_path} \
--trained_model=${pth_path} \
--label_file=models/voc-model-labels.txt > ${test_path_dir}/output/${ASCEND_DEVICE_ID}/test_${ASCEND_DEVICE_ID}.log 2>&1 &
wait
end_time=$(date +%s)
e2e_time=$(( $end_time - $start_time ))