Skip to content

I don't get performance gain by using Intel-Engine on VPU Myriad X for OpenCV-dnn module #15023

@AlexeyAB

Description

@AlexeyAB
System information (version)
  • OpenCV => 4.1.0
  • Operating System / Platform => Ubuntu 16.04 x86_64
  • Compiler => g++ 5.4.0
  • CPU Atom E3845 + VPU Myriad X
Detailed description

I don't get any significant performance gain by using Intel-Engine on VPU Myriad X for OpenCV-dnn module.

I get the same performance with CPU Atom E3845 and VPU Myriad X:

  • 0.3 FPS with backend=Intel-Engine and target=VPU
  • 0.25 FPS with backend=OpenCV-impl target=CPU
Steps to reproduce

I compiled OpenVINO 2019 R1.

I compiled OpenCV 4.1.0 with Intel's Deep Learning Inference Engine (DL IE) as described here: https://github.com/opencv/opencv/wiki/Intel's-Deep-Learning-Inference-Engine-backend

I modified this example (minor changes, but you can use this original file with the same effect): https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp
to this: ocv_yolo.cpp that is in attached repr.zip

And run this command:
./ocv_yolo --config=yolov3.cfg --model=yolov3.weights --input=test.mp4 --width=416 --height=416 --classes=coco.names --scale=0.00392 --rgb --backend=2 --targer=3

As known:

  • backend 0(auto), 1(Halide), 2(Intel-Engine), 3(OpenCV-impl)
  • target 0(CPU), 1(OpenCL), 2(OpenCV-FP16), 3(VPU)

But I get the same performance

  • 0.3 FPS with backend=2 and target=3
  • 0.25 FPS with backend=3 target=0

While by using OpenVINO example I get about 4.3 FPS on the same model. And it works successfully on Myriad X (VPU) for frozen_yolov3.pb TensorFlow-model that I got from yolov3.cfg/weights Darknet-model with 4.3 FPS by using this example from OpenVINO: https://github.com/opencv/open_model_zoo/blob/master/demos/object_detection_demo_yolov3_async/main.cpp

Source code to reproduce the problem - that uses OpenCV-dnn module for Yolov3 detection, required any test.mp4 file: repr.zip
Also required:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions