Openvino中设置模型加载路径的环境变量

本文介绍了如何在OpenVino中设置模型加载的环境变量,通过编写sh脚本并在.bashrc文件中添加相关指令,确保模型路径正确被系统识别。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

直接上代码:

# 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值