Interface ImageInferenceModel<T>

Type Parameters:
T - tensor-type that is both inputted to (representing an image), and outputted from the model during inference.
All Superinterfaces:
AutoCloseable, InferenceModel
All Known Implementing Classes:
OnnxModel, OpenCVModel

public interface ImageInferenceModel<T> extends InferenceModel
A model used for inference that accepts an image as an input.

A model should always be closed, when it is no longer in use.

Author:
Owen Feehan
  • Method Details

    • performInference

      <S> S performInference(T input, String inputName, List<String> outputIdentifiers, CheckedFunction<List<T>,S,OperationFailedException> convertOutput) throws OperationFailedException
      Performs inference on a single-input, to create an output.
      Type Parameters:
      S - the data-type the output is exposed as.
      Parameters:
      input - the input for inference.
      inputName - the name associated with input in the model.
      outputIdentifiers -
      convertOutput - converts the output to type <S>.
      Returns:
      the converted output.
      Throws:
      OperationFailedException - if the inference cannot successfully complete.