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
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 Summary
Modifier and Type Method Description <S> SperformInference(T input, String inputName, List<String> outputIdentifiers, CheckedFunction<List<T>,S,OperationFailedException> convertOutput)Performs inference on a single-input, to create an output.
-
Method Details
-
performInference
<S> S performInference(T input, String inputName, List<String> outputIdentifiers, CheckedFunction<List<T>,S,OperationFailedException> convertOutput) throws OperationFailedExceptionPerforms 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 withinputin the model.outputIdentifiers-convertOutput- converts the output to type<S>.- Returns:
- the converted output.
- Throws:
OperationFailedException- if the inference cannot successfully complete.
-