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.

OpenVino Conversion Error

nikolaev__aleksandr
1,154 Views

Hi everybody!

I'm trying to use OpenVino for detecting objects for my YOLOv3-spp Darknet model. I converted YOLOv3-spp to the TensorFlow model, then converted to IR (.xml and .bin). I have followed the guides https://github.com/mystic123/tensorflow-yolo-v3. But my model doesn't detect objects in OpenVino. All steps are done successfully but generated the following errors:

Model Optimizer version:     2019.3.0-408-gac8584cb7
/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/extensions/ops/elementwise.py:81: RuntimeWarning: invalid value encountered in multiply
  operation = staticmethod(lambda a, b: a * b)
[ ERROR ]  6 elements of 4718592 were clipped to infinity while converting a blob for node [['detector/darknet-53/Conv_45/Conv2D']] to <class 'numpy.float32'>. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #76. 
[ ERROR ]  7 elements of 4718592 were clipped to infinity while converting a blob for node [['detector/darknet-53/Conv_43/Conv2D']] to <class 'numpy.float32'>. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #76. 
[ ERROR ]  5 elements of 1179648 were clipped to infinity while converting a blob for node [['detector/darknet-53/Conv_32/Conv2D']] to <class 'numpy.float32'>. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #76. 
[ ERROR ]  43 elements of 4718592 were clipped to infinity while converting a blob for node [['detector/darknet-53/Conv_49/Conv2D']] to <class 'numpy.float32'>. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #76.

Then I run my model using the following command:

python3 object_detection_demo_yolov3_async.py -m frozen_darknet_yolov3_model.xml -i 2019-10-08_13-08-05_174443_52_rec.jpg -l libcpu_extension.so

The model is working but doesn't find objects. Just images without detecting. 

Please advise. Thank you!

0 Kudos
4 Replies
Cary_P_Intel1
Employee
1,154 Views

Hi,

I tried to convert and run the YoloV3-SPP model, it works well from my OpenVINO R3.1 release, I pasted the command I used for conversion and run with yolo sample.

Conversion to tensorflow pb file:

python .\convert_weights_pb.py --spp --class_name ..\coco.names --data_format NHWC --weights_file ..\yolov3-spp.weights

Conversion to IR file:

python "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo.py" --input_model .\frozen_darknet_yolov3_model.pb --tensorflow_use_custom_operations_config "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\extensions\front\tf\yolo_v3.json" --batch 1

Running the yolov3 sample:

C:\Users\cpai\Documents\Intel\OpenVINO\omz_demos_build_379\intel64\Release\object_detection_demo_yolov3_async.exe -m .\frozen_darknet_yolov3_model.xml -i cam

0 Kudos
nikolaev__aleksandr
1,154 Views

Cary P. (Intel) wrote:

Hi,

I tried to convert and run the YoloV3-SPP model, it works well from my OpenVINO R3.1 release, I pasted the command I used for conversion and run with yolo sample.

Conversion to tensorflow pb file:

python .\convert_weights_pb.py --spp --class_name ..\coco.names --data_format NHWC --weights_file ..\yolov3-spp.weights

Conversion to IR file:

python "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo.py" --input_model .\frozen_darknet_yolov3_model.pb --tensorflow_use_custom_operations_config "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\extensions\front\tf\yolo_v3.json" --batch 1

Running the yolov3 sample:

C:\Users\cpai\Documents\Intel\OpenVINO\omz_demos_build_379\intel64\Release\object_detection_demo_yolov3_async.exe -m .\frozen_darknet_yolov3_model.xml -i cam

Hi, Cary P,

Thank you for replying. I did everything as you wrote above but still have the same issue. Could you send a screen of your config file, please? Or if you want I can send my files to you for check. 

0 Kudos
Cary_P_Intel1
Employee
1,154 Views

Hi, nikolaev, aleksandr,

I didn't change anything in the config file, it's intact after toolkit installation as attached file. One thing forgot to mention, since the spp is newly added from the darknet, so you shouldn't checkout to the commit which was guided inside the OpenVINO YOLO conversion document, just use the repository you cloned from github directly. 

0 Kudos
nikolaev__aleksandr
1,154 Views

Cary P. (Intel) wrote:

Hi, nikolaev, aleksandr,

I didn't change anything in the config file, it's intact after toolkit installation as attached file. One thing forgot to mention, since the spp is newly added from the darknet, so you shouldn't checkout to the commit which was guided inside the OpenVINO YOLO conversion document, just use the repository you cloned from github directly. 

Thank you, I'll try again.

0 Kudos
Reply