Search code examples
pythonc++intelinferenceopenvino

Openvino Loading up binary file into a blob


Hi I am working on an audio classification model. I have implemented in python, now I need to port it to c++.

I do feature extraction in python as it is easier. I save these features, into a file. The feature is represented as a 2D array in numpy.(feature is not an image but one can think of it as as an image)

I would like to load them in to an InferenceEngine::Blob. All the examples I see are loading it from an image file (actual jpeg o gif) using openCV matrix. How can I load a binary array into a blob? Can I load 1D array and specify its shape(width and dimension) as I load it into a blob? If I have an int array of size 9, how can I convert it to 3x3 blob using Vino Api.

Can I / Do I have to load it to openCV matrix from a binary file?(The binary file is not an image) , Can I even do it without data being a an actual image file ?

Thanks


Solution

  • For the inference of non-image data, you can create the blob using the InferenceEngine::Blob classes. Here is the video on the example implementation of the Inference Engine main function call. https://www.youtube.com/watch?v=JwgPgKClU3w

    There is no specific example for an array as an input. Check out the following demos and samples for the supported models such as GNMT, BERT, TDNN, and ESPNet.