Hi,
I am using "Depthai Core", release v2.17.4, to create a C++ application utilizing a DeepLabV3 algorithm running on the OAK-D Pro. Currently, I am having a problem using the BLOB generated with OpenVino 2022.1 and not OpenVino 2021.4. The DeepLabV3 model is created with Keras, and I used the steps from "depthai-ml-training/colab-notebooks/DeepLabV3plus_MNV2.ipynb" to convert the TF model to OpenVINO Intermediate Representation: .xml and .bin and then convert the XML/Bin to a BLOB. The BLOB created with OpenVino 2021.4 runs but does not generates the results I get in Keras. This issue may be related to the XML fix discussed in the Colab notebook (still looking into this). So, I moved to OpenVino 2022.1, and when I run the BLOB on the OAK-D Pro, I get this error "[18443010A157641200] [1.1.1.3] [9.855] [NeuralNetwork(2)] [warning] Input image (256x256) does not match NN (3x256)". The input image to the BLOB is a 256x256x3 (RGB) preview image from the Color Camera. It appears the input is getting scrambled some how.
Is there an example code (python script or Colab notebook) using the new OpenVino 2022.1 or has anybody come across a similar problem?
Here is an excerpt from my python script to calls OpenVino 2021.4.
subprocess.call("source /opt/intel/openvino_2021/bin/setupvars.sh", shell=True)
subprocess.call("python /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo_tf.py \
--input_model \"" + frozen_file + "\" \
--model_name " + model_base_name + " \
--data_type " + data_type + " \
--input_shape \"[1," + str(IMAGE_SIZE) + "," + str(IMAGE_SIZE) + ",3]\" \
--reverse_input_channel \
--output_dir \"" + export_vino_dir + "\"", shell=True)
Here is my python call to OpenVino 2022.1
subprocess.call("mo \
--saved_model_dir \"" + model_export_dir + "\" \
--model_name " + model_base_name + " \
--data_type " + data_type + " \
--input_shape [1," + str(IMAGE_SIZE) + "," + str(IMAGE_SIZE) + ",3] \
--reverse_input_channel \
--output_dir \"" + export_vino_dir + "\"", shell=True)
Here is the BlobConverter code. I only change the OpenVino version in the code
print("(Step 18): Convert OpenVino IR to blob")
os.chdir(export_vino_dir)
blob_path = blobconverter.from_openvino(
xml=xml_file,
bin=bin_file,
data_type=data_type,
shaves=6,
version="2021.4")
Thanks for the help!
Mike E