PosturePerfection
|
A wrapper to make running inference easier. More...
#include <inference_core.h>
Public Member Functions | |
InferenceCore (const char *model_filename, size_t model_input_width, size_t model_input_height) | |
Construct a new Inference Core object. More... | |
InferenceResults | run (PreProcessing::PreProcessedImage preprocessed_image) |
Run a pre-processed image through the loaded model. More... | |
A wrapper to make running inference easier.
This class hides some of the complexity of the underlying TensorFlow Lite C++ API. It nonetheless expects preprocessed images. This means images will need to be resized to the model input dimensions and normalised from uint8_t
values to float
s in the interval [-1..1] before being run through a InferenceCore
object.
Inference::InferenceCore::InferenceCore | ( | const char * | model_filename, |
size_t | model_input_width, | ||
size_t | model_input_height | ||
) |
Construct a new Inference Core object.
model_filename | Path to the TensorFlow Lite model |
model_input_width | Width of the input to the model |
model_input_height | Height of the input to the model |
InferenceResults Inference::InferenceCore::run | ( | PreProcessing::PreProcessedImage | preprocessed_image | ) |
Run a pre-processed image through the loaded model.
preprocessed_image | An image that has been resized to the model input dimensions and normalised from uint8_t values to float s in the interval [-1..1] before being passed to this function |
InferenceResults