openvino object_detection_demo_yolov3_async .pb转.xml/.bin 目标检测
yolov3.xml
yolov3.bin
查看模型转换支持的模型文件列表models.lst
cd C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\inference_engine\demos\python_demos\object_detection_demo_yolov3_async
models.lst文件内容
# This file can be used with the --list option of the model downloader.
yolo-v1-tiny-tf
yolo-v2-tiny-tf
yolo-v2-tf
yolo-v3-tf
mobilefacedet-v1-mxnet
yolo-v3-tf
yolo-v3-tf为例
查看转换模型参数文件model.yml
cd C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\models\public\yolo-v3-tf
model.yml内容
description: >-
YOLO v3 is a real-time object detection model implemented with Keras* from this
repository <https://github.com/david8862/keras-YOLOv3-model-set> and converted to
TensorFlow* framework. This model was pretrained on COCO* dataset with 80 classes.
task_type: detection
files:
- name: yolo-v3.pb
size: 248128731
sha256: 8ed66d597a936924e98102a5fa16b38569452e17dbb52ddf2877e0f550f57952
source: https://download.01.org/opencv/public_models/022020/yolo_v3/yolov3.pb
- name: yolo-v3.json
size: 384
sha256: 90f3ea735a2a8908b66dab744b9ec0425fd2564f7b9be6ebd1564dd38d28ec5c
source: https://download.01.org/opencv/public_models/022020/yolo_v3/yolo_v3_new.json
model_optimizer_args:
- --input_shape=[1,416,416,3]
- --input=input_1
- --scale_values=input_1[255]
- --reverse_input_channels
- --transformations_config=$dl_dir/yolo-v3.json
- --input_model=$dl_dir/yolo-v3.pb
framework: tf
quantizable: yes
license: https://raw.githubusercontent.com/david8862/keras-YOLOv3-model-set/master/LICENSE
对应路径下载yolov3.pb和yolo_v3_new.json
source: https://download.01.org/opencv/public_models/022020/yolo_v3/yolov3.pb
source: https://download.01.org/opencv/public_models/022020/yolo_v3/yolo_v3_new.json
百度网盘下载yolov3.pb和yolo_v3_new.json
链接:https://pan.baidu.com/s/1w2qJTZAJj9xeHz85387rjQ
提取码:46ih
复制这段内容后打开百度网盘手机App,操作更方便哦--来自百度网盘超级会员V2的分享
yolov3.pb 转yolov3.xml/yolov3.bin
cd C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\model_optimizer
python mo_tf.py --input_shape=[1,416,416,3] --input=input_1 --scale_values=input_1[255] --reverse_input_channels --transformations_config=C:\Users\AINUC\Desktop\object_detection_demo_yolov3_async\yolo_v3_new.json --input_model=C:\Users\AINUC\Desktop\object_detection_demo_yolov3_async\yolov3.pb
百度网盘下载yolov3.xml/yolov3.bin
链接:https://pan.baidu.com/s/1w2qJTZAJj9xeHz85387rjQ
提取码:46ih
复制这段内容后打开百度网盘手机App,操作更方便哦--来自百度网盘超级会员V2的分享
目标检测执行
python object_detection_demo_yolov3_async.py -m yolov
3.xml -i 3.mp4 --labels coco.names
效果图
CPU 延迟太高。有GPU的最好
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-lDByDByU-1601366719760)(evernotecid://A7BA1EDC-F70B-4A16-ABAA-EDD379BB023D/appyinxiangcom/29884553/ENResource/p20)]
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-0C3SEVo0-1601366719762)(evernotecid://A7BA1EDC-F70B-4A16-ABAA-EDD379BB023D/appyinxiangcom/29884553/ENResource/p21)]
欢迎大家交流学习,任何问题都可以留言