直接上代码:
# Create variables for all models used by the tutorials to make
# it easier to reference them with short names
# check for variable set by setupvars.sh in the SDK, need it to find models
: ${InferenceEngine_DIR:?"Must source the setupvars.sh in the SDK to set InferenceEngine_DIR"}
# 4 = 2018 R4
# 5 = 2018 R5
# 6 = 2019 R1
if (echo $INTEL_CVSDK_DIR | grep -q "\.5\."); then
export INTEL_CVSDK_VER=5
else if (echo $INTEL_CVSDK_DIR | grep -q "openvino"); then
export INTEL_CVSDK_VER=6
else
export INTEL_CVSDK_VER=4
fi
fi
if [ $INTEL_CVSDK_VER -ne "6" ]; then
modelDir=$InferenceEngine_DIR/../../intel_models
# Vehicle and License Plates Detection Model
modName=vehicle-license-plate-detection-barrier-0106
export mVLP16=$modelDir/$modName/FP16/$modName.xml
export mVLP32=$modelDir/$modName/FP32/$modName.xml
# Vehicle-only Detection Model used with the batch size exercise
modName=vehicle-detection-adas-0002
export mVDR16=$modelDir/$modName/FP16/$modName.xml
export mVDR32=$modelDir/$modName/FP32/$modName.xml
# Vehicle Attributes Detection Model
modName=vehicle-attributes-recognition-barrier-0039
export mVA16=$modelDir/$modName/FP16/$modName.xml
export mVA32=$modelDir/$modName/FP32/$modName.xml
modName=person-vehicle-bike-detection-crossroad-0078
export vehicle216=$modelDir/$modName/FP16/$modName.xml
export vehicle232=$modelDir/$modName/FP32/$modName.xml
modName=pedestrian-and-vehicle-detector-adas-0001
export pv16=$modelDir/$modName/FP16/$modName.xml
expo