Functions
inference_engine.hpp File Reference

A header file that provides a set of convenience utility functions and the main include file for all other .h files. More...

#include <vector>
#include <numeric>
#include <algorithm>
#include <memory>
#include <ie_blob.h>
#include <ie_api.h>
#include <ie_error.hpp>
#include <ie_layers.h>
#include <ie_device.hpp>
#include <ie_plugin_dispatcher.hpp>
#include <ie_plugin_config.hpp>
#include <ie_icnn_network.hpp>
#include <ie_icnn_network_stats.hpp>
#include <ie_core.hpp>
#include <cpp/ie_cnn_net_reader.h>
#include <cpp/ie_plugin_cpp.hpp>
#include <cpp/ie_executable_network.hpp>
#include <ie_version.hpp>

Go to the source code of this file.

Functions

template<class T >
void InferenceEngine::TopResults (unsigned int n, TBlob< T > &input, std::vector< unsigned > &output)
 Gets the top n results from a tblob. More...
 
void InferenceEngine::TopResults (unsigned int n, Blob &input, std::vector< unsigned > &output)
 Gets the top n results from a blob. More...
 
template<typename data_t >
void InferenceEngine::copyFromRGB8 (uint8_t *RGB8, size_t RGB8_size, InferenceEngine::TBlob< data_t > *blob)
 Copies a 8-bit RGB image to the blob. Throws an exception in case of dimensions or input size mismatch. More...
 
void InferenceEngine::ConvertImageToInput (unsigned char *imgBufRGB8, size_t lengthbytesSize, Blob &input)
 Splits the RGB channels to either I16 Blob or float blob. The image buffer is assumed to be packed with no support for strides. More...
 
template<typename T >
void InferenceEngine::copyToFloat (float *dst, const InferenceEngine::Blob *src)
 Copies data from a certain precision to float. More...
 

Detailed Description

A header file that provides a set of convenience utility functions and the main include file for all other .h files.

Function Documentation

§ ConvertImageToInput()

void InferenceEngine::ConvertImageToInput ( unsigned char *  imgBufRGB8,
size_t  lengthbytesSize,
Blob input 
)
inline

Splits the RGB channels to either I16 Blob or float blob. The image buffer is assumed to be packed with no support for strides.

Parameters
imgBufRGB8Packed 24bit RGB image (3 bytes per pixel: R-G-B)
lengthbytesSizeSize in bytes of the RGB image. It is equal to amount of pixels times 3 (number of channels)
inputBlob to contain the split image (to 3 channels)

§ copyFromRGB8()

template<typename data_t >
void InferenceEngine::copyFromRGB8 ( uint8_t *  RGB8,
size_t  RGB8_size,
InferenceEngine::TBlob< data_t > *  blob 
)

Copies a 8-bit RGB image to the blob. Throws an exception in case of dimensions or input size mismatch.

Template Parameters
data_tType of the target blob
Parameters
RGB88-bit RGB image
RGB8_sizeSize of the image
blobTarget blob to write image to

§ copyToFloat()

template<typename T >
void InferenceEngine::copyToFloat ( float *  dst,
const InferenceEngine::Blob src 
)

Copies data from a certain precision to float.

Parameters
dstPointer to an output float buffer, must be allocated before the call
srcSource blob to take data from

§ TopResults() [1/2]

template<class T >
void InferenceEngine::TopResults ( unsigned int  n,
TBlob< T > &  input,
std::vector< unsigned > &  output 
)
inline

Gets the top n results from a tblob.

Parameters
nTop n count
input1D tblob that contains probabilities
outputVector of indexes for the top n places

§ TopResults() [2/2]

void InferenceEngine::TopResults ( unsigned int  n,
Blob input,
std::vector< unsigned > &  output 
)
inline

Gets the top n results from a blob.

Parameters
nTop n count
input1D blob that contains probabilities
outputVector of indexes for the top n places