Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

How to load yolo-v4-tf

at93
Beginner
1,155 Views

Hello,

The yolo-v4-tf is officially supported since the last version 2021.2  I have yet to find a demo program (CPP) that will support this model. 

Running object_detection_demo returns [ ERROR ] Invalid output type: Add. RegionYolo expected.

Running multi_channel_object_detection_demo_yolov3 failed silently.

Is there anyone who has the insights in how to run this model?

0 Kudos
7 Replies
Peh_Intel
Moderator
1,127 Views

Hi Allen,


Greetings to you.


The yolo-v4-tf model is not yet available for the CPP demo application but is available for the Python demo application which you may refer to the available supported models in each respective models.lst file.



Regards,

Peh


0 Kudos
at93
Beginner
1,123 Views

Thanks Peh,

I did notice that about the python script. I was looking for C++ sample. FYI, the python script is running very slow with yolo-v4-tf model using FP16 with GPU or CPU with less than 2 FPS (on an i9 CPU).  Repeat the same test with yolov3 with the same settings, I got about 6 FPS.

0 Kudos
Peh_Intel
Moderator
1,098 Views

Hi Allen,


Unfortunately, we do not have any CPP demo that works with yolo-v4. Currently, the Object Detection demo extended support for new models, yolo-v4 (only in Python version).  


To increase the FPS, I would suggest you use yolo-v3-tiny instead of yolo-v3.



Regards,

Peh


0 Kudos
at93
Beginner
1,074 Views

Hi Peh,

Yolo-v4 is supposed to be faster and better than Yolo-V3. My observation is that the Python demo for yolo-v4 in this release is way too slow compared to this repo found here https://github.com/TNTWEN/OpenVINO-YOLOV4/tree/ScaledYOLOv4.

0 Kudos
Peh_Intel
Moderator
1,044 Views

Hi Allen,

 

Yolo-v4 supposed be faster than yolo-v3 but after converting them to IR, it is expected that yolo-v3 (IR) is faster than yolo-v4 (IR). You may check the performance of both models with the OpenVINO™ toolkit Benchmark Tool which is available in the directory:

<installed_dir>\deployment_tools\tools\benchmark_tool


Scaled-yolo-v4 has better performance if compared to our yolo-v4. You may have a try with the repo that you shared.


On the other hand, I would like to share to you, by setting `-nireq` slightly exceed the `-nstreams` value in our object detection demo can result in a slightly increase in FPS. You may refer to the README.md for more information.


However, the internal organization of the callback mechanism in Python API leads to FPS decrease. As such, I would recommend you use the Object Detection CPP demo with yolo-v3-tiny-tf which can achieve more than 20 FPS.



Regards,

Peh 


0 Kudos
Peh_Intel
Moderator
1,014 Views

Hi Allen,


This thread will no longer be monitored since we have provided a suggestion. If you need any additional information from Intel, please submit a new question.



Regards,

Peh


0 Kudos
Vladimir_Dudnik
Employee
1,004 Views

It is worth to notice, that when you compare performance of yolo-v3-tf against yolo-v4-tf models in Open Model Zoo the difference in model input resolution should be taken into account. You can see from model descriptions that yolo-v3 has 416x416 input resolution while yolo-v4 has 608x608

0 Kudos
Reply