<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.1.0</li>
<li>Operating System / Platform =&gt; Ubuntu 16.04 x86_64</li>
<li>Compiler =&gt; g++ 5.4.0</li>
<li>CPU Atom E3845 + VPU Myriad X</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I don't get any significant performance gain by using Intel-Engine on VPU Myriad X for OpenCV-dnn module.</p>
<p dir="auto">I get the same performance with CPU Atom E3845 and VPU Myriad X:</p>
<ul dir="auto">
<li><strong>0.3 FPS</strong> with <code class="notranslate">backend=Intel-Engine and target=VPU</code></li>
<li><strong>0.25 FPS</strong> with <code class="notranslate">backend=OpenCV-impl target=CPU</code></li>
</ul>

<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">I compiled OpenVINO 2019 R1.</p>
<p dir="auto">I compiled OpenCV 4.1.0 with Intel's Deep Learning Inference Engine (DL IE) as described here: <a href="https://github.com/opencv/opencv/wiki/Intel's-Deep-Learning-Inference-Engine-backend">https://github.com/opencv/opencv/wiki/Intel's-Deep-Learning-Inference-Engine-backend</a></p>
<p dir="auto">I modified this example (minor changes, but you can use this original file with the same effect): <a href="https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp">https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp</a><br>
to this: <code class="notranslate">ocv_yolo.cpp</code> that is in attached <a href="https://github.com/opencv/opencv/files/3383463/repr.zip">repr.zip</a></p>
<p dir="auto">And run this command:<br>
<code class="notranslate">./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 </code></p>
<p dir="auto">As known:</p>
<ul dir="auto">
<li>backend 0(auto), 1(Halide), 2(Intel-Engine), 3(OpenCV-impl)</li>
<li>target 0(CPU), 1(OpenCL), 2(OpenCV-FP16), 3(VPU)</li>
</ul>
<p dir="auto">But I get the same performance</p>
<ul dir="auto">
<li><strong>0.3 FPS</strong> with <code class="notranslate">backend=2 and target=3</code></li>
<li><strong>0.25 FPS</strong> with <code class="notranslate">backend=3 target=0</code></li>
</ul>
<p dir="auto">While by using OpenVINO example I get about <strong>4.3 FPS</strong> on the same model. And it works successfully on Myriad X (VPU) for <code class="notranslate">frozen_yolov3.pb</code> TensorFlow-model that I got from <code class="notranslate">yolov3.cfg/weights</code> Darknet-model with <strong>4.3 FPS</strong> by using this example from OpenVINO: <a href="https://github.com/opencv/open_model_zoo/blob/master/demos/object_detection_demo_yolov3_async/main.cpp">https://github.com/opencv/open_model_zoo/blob/master/demos/object_detection_demo_yolov3_async/main.cpp</a></p>
<p dir="auto">Source code to reproduce the problem - that uses OpenCV-dnn module for Yolov3 detection, required any <code class="notranslate">test.mp4</code> file: <a href="https://github.com/opencv/opencv/files/3383463/repr.zip">repr.zip</a><br>
Also required:</p>
<ul dir="auto">
<li><a href="https://pjreddie.com/media/files/yolov3.weights" rel="nofollow">https://pjreddie.com/media/files/yolov3.weights</a></li>
<li><a href="https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg" rel="nofollow">https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg</a></li>
</ul>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 3.4 branch ( <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/opencv/opencv/commit/442fdfd4b262b8d2d3ada82f7fbe786a0bd00708/hovercard" href="https://github.com/opencv/opencv/commit/442fdfd4b262b8d2d3ada82f7fbe786a0bd00708"><tt>442fdfd</tt></a> ) master branch ( <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/opencv/opencv/commit/332c37f332733e5a2d717fc6eb4d605a304cda70/hovercard" href="https://github.com/opencv/opencv/commit/332c37f332733e5a2d717fc6eb4d605a304cda70"><tt>332c37f</tt></a> )</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04/Aarch64/Jetson Xavier , Windows 10 Pro/x86_64</li>
<li>Compiler =&gt; GCC 7.3.0/Visual Studio 2015</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<ul dir="auto">
<li>YUV color conversion test cases from <code class="notranslate">opencv_perf_cudaimgproc</code> fails at sanity check</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="opencv_perf_cudaimgproc --gtest_filter=*CvtColor*
&lt;snip&gt;
[==========] 174 tests from 2 test cases ran. (17442 ms total)
[  PASSED  ] 156 tests.
[  FAILED  ] 18 tests, listed below:
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/7, where GetParam() = (1280x720, CV_8U, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/8, where GetParam() = (1280x720, CV_8U, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/28, where GetParam() = (1280x720, CV_32F, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/29, where GetParam() = (1280x720, CV_32F, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/40, where GetParam() = (1280x720, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/41, where GetParam() = (1280x720, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/49, where GetParam() = (1280x1024, CV_8U, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/50, where GetParam() = (1280x1024, CV_8U, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/70, where GetParam() = (1280x1024, CV_32F, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/71, where GetParam() = (1280x1024, CV_32F, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/82, where GetParam() = (1280x1024, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/83, where GetParam() = (1280x1024, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/91, where GetParam() = (1920x1080, CV_8U, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/92, where GetParam() = (1920x1080, CV_8U, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/112, where GetParam() = (1920x1080, CV_32F, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/113, where GetParam() = (1920x1080, CV_32F, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/124, where GetParam() = (1920x1080, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/125, where GetParam() = (1920x1080, CV_32F, Luv2LRGB)

18 FAILED TESTS"><pre class="notranslate"><code class="notranslate">opencv_perf_cudaimgproc --gtest_filter=*CvtColor*
&lt;snip&gt;
[==========] 174 tests from 2 test cases ran. (17442 ms total)
[  PASSED  ] 156 tests.
[  FAILED  ] 18 tests, listed below:
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/7, where GetParam() = (1280x720, CV_8U, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/8, where GetParam() = (1280x720, CV_8U, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/28, where GetParam() = (1280x720, CV_32F, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/29, where GetParam() = (1280x720, CV_32F, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/40, where GetParam() = (1280x720, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/41, where GetParam() = (1280x720, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/49, where GetParam() = (1280x1024, CV_8U, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/50, where GetParam() = (1280x1024, CV_8U, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/70, where GetParam() = (1280x1024, CV_32F, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/71, where GetParam() = (1280x1024, CV_32F, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/82, where GetParam() = (1280x1024, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/83, where GetParam() = (1280x1024, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/91, where GetParam() = (1920x1080, CV_8U, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/92, where GetParam() = (1920x1080, CV_8U, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/112, where GetParam() = (1920x1080, CV_32F, BGR2YUV)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/113, where GetParam() = (1920x1080, CV_32F, YUV2BGR)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/124, where GetParam() = (1920x1080, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/125, where GetParam() = (1920x1080, CV_32F, Luv2LRGB)

18 FAILED TESTS
</code></pre></div>
<ul dir="auto">
<li>I can confirm that <code class="notranslate">opencv_test_cudaimgproc</code> passes with no error</li>
<li>I also added <code class="notranslate">(1920,1080)</code> size in <code class="notranslate">opencv_test_cudaimgproc</code> just in case not to miss any corner cases.  Still, <code class="notranslate">opencv_test_cudaimgproc</code> passed with no regression.</li>
<li>This leads me to believe that the cause is now test data it self, which needs to be updated.</li>
<li>I ran <code class="notranslate">opencv_perf_cudaimgproc</code> with <code class="notranslate">perf_write_sanity=true</code> and now making a PR.</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="opencv_perf_cudaimgproc --gtest_filter=*CvtColor*
&lt;snip&gt;
[==========] 174 tests from 2 test cases ran. (16937 ms total)
[  PASSED  ] 168 tests.
[  FAILED  ] 6 tests, listed below:
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/40, where GetParam() = (1280x720, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/41, where GetParam() = (1280x720, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/82, where GetParam() = (1280x1024, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/83, where GetParam() = (1280x1024, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/124, where GetParam() = (1920x1080, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/125, where GetParam() = (1920x1080, CV_32F, Luv2LRGB)

 6 FAILED TESTS"><pre class="notranslate"><code class="notranslate">opencv_perf_cudaimgproc --gtest_filter=*CvtColor*
&lt;snip&gt;
[==========] 174 tests from 2 test cases ran. (16937 ms total)
[  PASSED  ] 168 tests.
[  FAILED  ] 6 tests, listed below:
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/40, where GetParam() = (1280x720, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/41, where GetParam() = (1280x720, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/82, where GetParam() = (1280x1024, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/83, where GetParam() = (1280x1024, CV_32F, Luv2LRGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/124, where GetParam() = (1920x1080, CV_32F, Luv2RGB)
[  FAILED  ] Sz_Depth_Code_CvtColor.CvtColor/125, where GetParam() = (1920x1080, CV_32F, Luv2LRGB)

 6 FAILED TESTS
</code></pre></div>
<ul dir="auto">
<li>After updating the test data, performance test of YUV series passed.  Now Luv series seems to have different cause, so I'll look in to it afterward.</li>
</ul>
<h5 dir="auto">Steps to reproduce</h5>