当前位置:网站首页>三、OpenVINO实战:图像分类
三、OpenVINO实战:图像分类
2022-07-28 05:22:00 【Aaaaaki】
三、OpenVINO实战:图像分类
任务流程
终端初始化OpenVINO环境
进入OpenVINO安装目录,找到 setupvars.bat 文件并运行,结果如下图所示,即初始化成功。

模型获取与转换
调用模型下载器并通过 –print_all 查看可供下载的模型

通过 –name 选择squeezenet1.1 模型进行下载,结果如下图所示
- 在下载时若出现 [Error 11004] getaddrinfo failed 提示,原因在于host地址被墙,将地址 raw.githubusercontent.com 添加到host文件中即可。
- 可在 –name 后添加 –output_dir 指定下载路径

通过模型优化器(model_optimizer)将模型转换为IR文件
进入OpenVINO下的模型优化器文件夹 ./deployment_tools/model_optimizer ,因为下载的squeezenet1.1模型为caffe模型,因此运行 mo_caffe.py 文件进行转换。
python mo_caffe.py --input_model path --output_dir path运行成功后获得相应的 bin文件 和 xml文件

图像分类
准备好squeezenet1.1的标签文件 squeezenet1.1.labels,文件已传百度云
链接:https://pan.baidu.com/s/17BCKqbTGusnzE5THNz_Spg
提取码:ysew
从推理引擎示例中获取一个简单的分类示例
复制 ./OpenVINO/inference_engine/sample/python/classification_sample_async/ 路径下的 classification_sample_async.py 文件到你的 exercise 目录
运行该示例,指定输入图像、模型、标签文件以及设备,获取结果
python classification_samples_async.py -i image_path -m xml_path --labels label_path -d devices_name输入图像为:

最终分类结果为:

边栏推荐
- Uview upload component upload upload auto upload mode image compression
- 自动定时备份远程mysql脚本
- 深度学习(自监督:SimCLR)——A Simple Framework for Contrastive Learning of Visual Representations
- 字节Android岗4轮面试,收到 50k*18 Offer,裁员风口下成功破局
- 微信小程序开发制作注意这几个重点方面
- Sort method for sorting
- Scenario solution of distributed cluster architecture: cluster clock synchronization
- Pytorch deep learning single card training and multi card training
- Ssh/scp breakpoint resume Rsync
- Why is the kotlin language not popular now? What's your opinion?
猜你喜欢

Distributed lock database implementation

Which is more reliable for small program development?

无约束低分辨率人脸识别综述二:异构低分辨率人脸识别方法

一、语音合成与自回归模型

神经网络优化

What are the points for attention in the development and design of high-end atmospheric applets?

深度学习(增量学习)——(ICCV)Striking a Balance between Stability and Plasticity for Class-Incremental Learning

知识点21-泛型

深度学习(自监督:MoCo v2)——Improved Baselines with Momentum Contrastive Learning

How much does small program development cost? Analysis of two development methods!
随机推荐
1: Why should databases be divided into databases and tables
小程序开发如何提高效率?
flutter webivew input唤起相机相册
《AdaFace: Quality Adaptive Margin for Face Recognition》用于人脸识别的图像质量自适应边缘损失
深度学习(自监督:MoCo V3):An Empirical Study of Training Self-Supervised Vision Transformers
小程序开发
小程序商城制作一个需要多少钱?一般包括哪些费用?
How much does small program development cost? Analysis of two development methods!
小程序开发系统有哪些优点?为什么要选择它?
微信小程序制作模板套用时需要注意什么呢?
强化学习——基础概念
Bert的使用方法
Utils commonly used in NLP
面试官:让你设计一套图片加载框架,你会怎么设计?
Invalid packaging for parent POM x, must be “pom“ but is “jar“ @
uView上传组件upload上传auto-upload模式图片压缩
使用神经网络实现对天气的预测
Regular verification rules of wechat applet mobile number
The project does not report an error, operates normally, and cannot request services
Four perspectives to teach you to choose applet development tools?