diff --git a/ACL_PyTorch/contrib/cv/tracking/SiamFC/test/eval_acc_perf.sh b/ACL_PyTorch/contrib/cv/tracking/SiamFC/test/eval_acc_perf.sh index 0da3b119ddcc9178002225ee0acf640b09eaaf90..675ee3eb966e7ca7d910f4257e244c0d1d610348 100644 --- a/ACL_PyTorch/contrib/cv/tracking/SiamFC/test/eval_acc_perf.sh +++ b/ACL_PyTorch/contrib/cv/tracking/SiamFC/test/eval_acc_perf.sh @@ -14,7 +14,7 @@ source env.sh rm -rf ./result/* echo "====conducting preprocess, inferrence and postprocess====" -python3.7 wholeprocess.py ${datasets_path}/OTB/ ./pre_dataset ./dataset_info $(arch) 0 +python3.7 wholeprocess.py ${datasets_path}/OTB/ ./pre_dataset ./dataset_info $(arch) 0 ./benchmark.${arch} ./om/ if [ $? != 0 ]; then echo "fail!" exit -1 diff --git a/ACL_PyTorch/contrib/cv/tracking/SiamFC/wholeprocess.py b/ACL_PyTorch/contrib/cv/tracking/SiamFC/wholeprocess.py index a41baadaa37c430999e6401e4b57647a5908f237..2bd05d59587ae0f691c9b9dbf4c57435df79cd7c 100644 --- a/ACL_PyTorch/contrib/cv/tracking/SiamFC/wholeprocess.py +++ b/ACL_PyTorch/contrib/cv/tracking/SiamFC/wholeprocess.py @@ -242,10 +242,10 @@ class ExperimentOTB(object): file1.write(content) file1.write('\n') # infer - os.system('./benchmark.%s -model_type=vision -device_id=%d -batch_size=1 ' - '-om_path=./om/exemplar_bs1.om -input_text_path=%s ' + os.system('%s -model_type=vision -device_id=%d -batch_size=1 ' + '-om_path=s%/exemplar_bs1.om -input_text_path=%s ' '-input_width=127 -input_height=127 -output_binary=True -useDvpp=False >/dev/null 2>&1' - % (arch, deviceid, infopath)) + % (benchmark_path, deviceid, om_path, infopath)) # the exemplar has a result of 3*256*6*6 tensor # read tensor from bin filename = img_file.replace('/', '-').split('.')[0] + '_1.bin' @@ -260,10 +260,10 @@ class ExperimentOTB(object): file2.write(content) file2.write('\n') # infer - os.system('./benchmark.%s -model_type=vision -device_id=%d -batch_size=1 ' - '-om_path=./om/search_bs1.om -input_text_path=%s ' + os.system('%s -model_type=vision -device_id=%d -batch_size=1 ' + '-om_path=%s/search_bs1.om -input_text_path=%s ' '-input_width=255 -input_height=255 -output_binary=True -useDvpp=False >/dev/null 2>&1' - % (arch, deviceid, infopath)) + % (benchmark_path, deviceid, om_path, infopath)) # the exemplar has a result of 1*768*22*22 tensor # read tensor from bin filename = img_file.replace('/', '-').split('.')[0] + '_1.bin' @@ -404,6 +404,8 @@ if __name__ == "__main__": info_path = sys.argv[3] arch = sys.argv[4] deviceid = int(sys.argv[5]) + benchmark_path = sys.argv[6] + om_path = sys.argv[7] os.system('rm -rf %s' % save_path) os.system('rm -rf %s' % info_path) os.system('rm -rf ./result/dumpOutput_device%d' % deviceid)