-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenCV DNN OpenVino Example #5992
Comments
|
I'm also using OpenCV to run Yolo models, and I'm getting very slow average processing times: 1300ms for YOLOv3 and 167ms (Ryzen 3 2200G @ 3.5GHz x 4). I'm using a docker image that runs Linux, and I'm just pip installing OpenCV. The network is used in a simple python script, with the OpenCV DNN module. I understood that: 1 - You need to convert your model using the OpenVINO Model Optimizer as described here: 2 - Build OpenCV with OpenVINO backend instead of just pip installing it: 3 - At your code, use: It is not the priority of my project right now, so if you can make it work, please share with us! |
@AlexeyAB No that does not work. I've compiled OpenCV with OpenVino and TBB.
And run with cfg/weights file directly, I get:
It does look like it expects the I also tried to use the integrated graphics by setting the target to OpenCL: I end up with unkown exception, that target does not even ask for
I've compiled OpenVino 2020 R1 release with OpenCV 4.3.0. |
@marcusbrito not sure if AMD cpus get the heavy opimisations of cpu dnn. Just with TBB I'm able to run yolo-v3-tiny and the pruned version close to 60FPS on Intel Core i5 8279U. Will update you after I figure out OpenVINO. |
Check the link on my previous response, it's the guide to converte your (.cfg, .weights) files to (.bin, .xml)
Even normal OpenCV, without OpenVino, is not optimised for AMD CPUs? Can you please share how you are using the net? Because I'm running:
As in: opencv/opencv#17185 and getting those really poor results. |
I can successfully use yolov4.cfg and yolov4.weights files directly without any convertation for inference on CPU, GPU, VPU for both cases with OpenVINO and without it.
No. If you use OpenCV for inference, that you need not convert your model. Use cfg/weights file directly in OpenCV-dnn.
YOLOv4 512x512 (leaky FP32) achieves 3.5 FPS (285ms latency batch=1) on CPU Core i7-6500k: #5079 And YOLOv4 512x512 (Mish, batch=4 FP16) achieves 190 FPS on RTX 2080Ti https://gist.github.com/YashasSamaga/48bdb167303e10f4d07b754888ddbdcf |
@AlexeyAB What version of OpenCV and OpenVINO are you on? Did you compile from source or did you use the ready binaries supplied by Intel? I end up with those errors mentioned previously if I pass the weights and config file directly. Do you suspect something wrong in my steps? |
OpenCV 4.4.0-pre compiled by self. OpenVino 2020.R3, Myriad. Input 416x416
|
@ausk did you convert the weights file? |
@RakshithGB No, opencv dnn module (with myriad target) supports to load .cfg and .weights directly. Maybe you just want use openvino with opencv dnn module, but it's another question. |
Hi,
Could you please provide an example of how to run yolo-v3-tiny and yolo-v3-tiny-prn version on OpenCV with OpenVino optimisation? Ideally I want to run a study on different CPUs and Integrated Intel Graphic cards and publish performance. I think this would help a lot of people, since many people want to run on CPU or the available integrated GPU in realtime.
The text was updated successfully, but these errors were encountered: