PosturePerfection
Public Member Functions
Inference::InferenceCore Class Reference

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

Detailed Description

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 floats in the interval [-1..1] before being run through a InferenceCore object.

Constructor & Destructor Documentation

◆ InferenceCore()

Inference::InferenceCore::InferenceCore ( const char *  model_filename,
size_t  model_input_width,
size_t  model_input_height 
)

Construct a new Inference Core object.

Parameters
model_filenamePath to the TensorFlow Lite model
model_input_widthWidth of the input to the model
model_input_heightHeight of the input to the model

Member Function Documentation

◆ run()

InferenceResults Inference::InferenceCore::run ( PreProcessing::PreProcessedImage  preprocessed_image)

Run a pre-processed image through the loaded model.

Parameters
preprocessed_imageAn image that has been resized to the model input dimensions and normalised from uint8_t values to floats in the interval [-1..1] before being passed to this function
Returns
InferenceResults

The documentation for this class was generated from the following files: