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

Converting YOLO to IR with wrong result

albert5
Novice
825 Views

Hi I am able to sucessfully convert from YOLO to IR now, but there is still problem after converting the model become wrong / problematic with 2 problems that I notice:

1. The confidence and the prediction class disappear

2. There is something wrong with the calculation as the return bounding box have inf value.

As from what I see from the conversion log nothing should be wrong . Below is my conversion log:

Model Optimizer arguments:
Common parameters:
- Path to the Input Model: None
- Path for generated IR: C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\model_optimizer\models/IRs
- IR output name: yolov4
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: Not specified, inherited from the model
- Output layers: Not specified, inherited from the model
- Input shapes: [1,416,416,3]
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: None
- Reverse input channels: False
TensorFlow specific parameters:
- Input model in text protobuf format: False
- Path to model dump for TensorBoard: None
- List of shared libraries with TensorFlow custom layers implementation: None
- Update the configuration file with input/output node names: None
- Use configuration file used to generate the model with Object Detection API: None
- Use the config file: None
- Inference Engine found in: C:\Program Files (x86)\Intel\openvino_2021.3.394\python\python3.8\openvino
Inference Engine version: 2.1.2021.3.0-2787-60059f2c755-releases/2021/3
Model Optimizer version: 2021.3.0-2787-60059f2c755-releases/2021/3
[ SUCCESS ] Generated IR version 10 model.
[ SUCCESS ] XML file: C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\model_optimizer\models\IRs\yolov4.xml
[ SUCCESS ] BIN file: C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\model_optimizer\models\IRs\yolov4.bin
[ SUCCESS ] Total execution time: 31.73 seconds.

Please help Thank you

7 Replies
Iffa_Intel
Moderator
775 Views

Hi,


Are you using the latest version of OpenVINO?

Plus which version of Yolo is that?

If possible can you share your files?




Sincerey,

Iffa


albert5
Novice
746 Views

I am using OpenVino 2021.3 not the newest. The Yolo is Yolo V4. For the YoloV4.weights did you mind if I send to your email instead because I can't attach it here. Thanks

Iffa_Intel
Moderator
730 Views

Hi,


Yes, you could send it through email. Any chance that you could try it with the latest version of OpenVINO?

Plus, may I know, which application did you used to infer this with? (eg: classification sample, object detection, etc)



Sincerely,

Iffa


albert5
Novice
702 Views

Here is the link for the file : https://drive.google.com/file/d/1--h50LkkBuuht0PL0-totnJFV2Ij1uIh/view?usp=sharing

Ok I will try it on the latest update I will tell you the result later and I am using i for object detection

Iffa_Intel
Moderator
693 Views

Noted.

The latest OpenVINO version might have the fix for your issue.



Sincerely,

Iffa


Iffa_Intel
Moderator
668 Views

Hi, are you able to get any progress?

 

I checked your yolov4 model and it seems that you didn't have the correct shape.

I believe you had changed this model from its original format. (I tried to convert as normal weight and tiny)

 

If your model format is correct, you should be able to freeze your model into .pb using the script from here: https://github.com/TNTWEN/OpenVINO-YOLOV4

Note: this steps is very important as this is your core model which got nothing to do with OpenVINO yet.

 

Please help to check & fix that problem first before attempting to convert them into IR with OpenVINO Model Optimizer because this issue will definitely cause error.

 

This Github thread discussion might help you:

https://github.com/hunglc007/tensorflow-yolov4-tflite/issues/147

 

 

SIncerely,

Iffa

 

Iffa_Intel
Moderator
630 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question. 



Sincerely,

Iffa


Reply