Class Inference

  • All Implemented Interfaces:

    
    public class Inference
    
                        

    Inference class for running model processing lifecycles.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Inference(Model model, InferenceOptions options) Constructs an inference engine for a given model.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T> T run(Array<byte> imageBytes) Runs inference on a provided byte array and returns results.
      <T> T run(Bitmap bitmap) Runs inference on a provided image bitmap and returns a summary.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Inference

        Inference(Model model, InferenceOptions options)
        Constructs an inference engine for a given model.
        Parameters:
        model - the model instance used to perform inference
        options - configuration options to control inference behavior
    • Method Detail

      • run

         <T> T run(Array<byte> imageBytes)

        Runs inference on a provided byte array and returns results.

        Parameters:
        imageBytes - the image in byte[] format to run inference on
        Returns:

        an Inference Results representing the inference output

      • run

         <T> T run(Bitmap bitmap)

        Runs inference on a provided image bitmap and returns a summary.

        Parameters:
        bitmap - the image bitmap to run inference on
        Returns:

        a Results object representing the inference output