public class KetosWorker extends DLModelWorker<StandardPrediction>
Runs a Ketos deep learning model and performs feature extraction.

Author:
Jamie Macaulay
  • Constructor Details

    • KetosWorker

      public KetosWorker()
      SoundSpotWorker constructor.
  • Method Details

    • prepModel

      public DLStatus prepModel(StandardModelParams ketosDLParams, DLControl dlControl)
      Prepare the model
      Specified by:
      prepModel in class DLModelWorker<StandardPrediction>
      Parameters:
      ketosDLParams - - the parameters for the sound spot model.
      dlControl - - the control object for the deep learning process.
      Returns:
    • runModel

      public float[] runModel(float[][][] transformedDataStack)
      Description copied from class: DLModelWorker
      Run the model on a stack of transformed data.
      Specified by:
      runModel in class DLModelWorker<StandardPrediction>
      Parameters:
      transformedDataStack - - the input data for the model where the outer array is the number of input images or wavforms.
      Returns:
      the prediction as a flattened array of probabilities for each class.
    • makeModelResult

      public KetosResult makeModelResult(float[] prob, double time)
      Description copied from class: DLModelWorker
      Make a model result from the probabilities and the time it took to run the model.
      Specified by:
      makeModelResult in class DLModelWorker<StandardPrediction>
      Parameters:
      prob - - the probabilities for each class.
      time - - the time taken to run the model.
      Returns:
      a model result object.
    • closeModel

      public void closeModel()
      Destroy the model.
      Specified by:
      closeModel in class DLModelWorker<StandardPrediction>
    • getModel

      public org.jamdev.jdl4pam.ketos.KetosModel getModel()
      Get the currently loaded mode.
      Returns:
      - the currently loaded mode.
    • isModelNull

      public boolean isModelNull()
      Description copied from class: DLModelWorker
      Check whether a model is null or not.
      Specified by:
      isModelNull in class DLModelWorker<StandardPrediction>
      Returns:
      true of the model is null.