Interface IPredictorR>

Type Parameters:
T - input type
R - output type
All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
IDetectionPredictor, IOrientationPredictor, IRecognitionPredictor
All Known Implementing Classes:
AbstractOnnxPredictor, OnnxDetectionPredictor, OnnxOrientationPredictor, OnnxRecognitionPredictor

public interface IPredictorR> extends AutoCloseable
Interface of a generic predictor. It takes a stream of inputs and returns a same-sizes stream of outputs.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Iterator<R>
    predict(Iterable<T> inputs)
    Performs prediction on a sequence of input items provided as an Iterable.
    predict(Iterator<T> inputs)
    Performs prediction on a sequence of input items.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • predict

      Iterator<R> predict (Iterator<T> inputs)
      Performs prediction on a sequence of input items.

      This method consumes the provided Iterator of inputs and produces an Iterator of outputs, typically yielding one result per input item.

      Parameters:
      inputs - an Iterator over the input items to be processed
      Returns:
      an Iterator over the predicted output items
    • predict

      default Iterator<R> predict (Iterable<T> inputs)
      Performs prediction on a sequence of input items provided as an Iterable.
      Parameters:
      inputs - an Iterable over the input items to be processed
      Returns:
      an Iterator over the predicted output items