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.
6401 Discussions

Not able to convert openvino2021 code to openvino 2022.4 properly.

TarunM
Beginner
633 Views

I am able to run this  https://github.com/Megvii-BaseDetection/YOLOX/blob/main/demo/OpenVINO/cpp/yolox_openvino.cpp on OpenVino2021.4 but it is not giving the correct output when I use c++ latest openvino 2022.1

(values are different of output ->latest openvino2022.1)

I am able to run the c++  code to 2022.1 after some modifications but infer output values are different from 2021.4.

I suspect an input or output ; setting or precision problem in my converted code, or maybe a problem when I set the input using method

std::shared_ptr<unsigned char> getData(cv::Mat& img)

or maybe a problem when I get the output as float*

The ir file works perfectly with python openvino2022.1 only problem in using c++.

Please help. Attached is my converted c++ code to 2022.1 OpenVino.

 

 

0 Kudos
4 Replies
IntelSupport
Community Manager
608 Views

Hi TarunM,

 

Thanks for reaching out.

 I am able to run https://github.com/Megvii-BaseDetection/YOLOX/tree/main/demo/OpenVINO demo using the yolox_tiny model for both python and CPP. Also, I am using OpenVINO 2022.1.

 

Both python and CPP demos give the same output as below.

tarunM._cpp (2).JPG

 

However, I am unable to run your converted CPP file. Please provide the workaround and related files for us to validate and test on our end.

 

 

Regards,

Aznie

 

0 Kudos
TarunM
Beginner
594 Views

Wow! Can you please provide your OpenVino2022.1 c++ code? That will be great healp. I will try that. If that works for me, no need for further investigation.

0 Kudos
IntelSupport
Community Manager
574 Views

 

Hi TarunM,

 

Here I share my workaround and also the file that I used.

 

  1. Download YOLOX-Tiny
  2. Git clone https://github.com/Megvii-BaseDetection/YOLOX.git
  3. Go to YOLOX/demo/OpenVINO/cpp folder.
  4. Run mkdir build
  5. Cd build
  6. Cmake ..
  7. make
  8. Run ./yolox_openvino <model_path/yolox_tiny.xml> <image_path>

 

Regards,

Aznie

 

0 Kudos
Hairul_Intel
Moderator
537 Views

Hi TarunM,

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

 

 

Regards,

Hairul


0 Kudos
Reply