Direct Known Subclasses:
DelphinIDWorker, KetosWorker2, KooguModelWorker

public class ArchiveModelWorker extends GenericModelWorker
Runs a Ketos deep learning model and performs feature extraction.

Author:
Jamie Macaulay
  • Constructor Details

    • ArchiveModelWorker

      public ArchiveModelWorker()
      SoundSpotWorker constructor.
  • Method Details

    • prepModel

      public void prepModel(StandardModelParams dlParams, DLControl dlControl)
      Prepare the model. Note it is important to put a synchonized here or the model loading can fail.
      Overrides:
      prepModel in class GenericModelWorker
    • loadModel

      public org.jamdev.jdl4pam.ArchiveModel loadModel(String currentPath2) throws ai.djl.MalformedModelException, IOException
      Load a model from a file
      Parameters:
      currentPath - - the path to the model.
      Throws:
      ai.djl.MalformedModelException
      IOException
    • makeModelParams

      public org.jamdev.jdl4pam.genericmodel.GenericModelParams makeModelParams(String jsonString)
      Create the parameters from a JSON string.
      Parameters:
      jsonString - - the json string.
      Returns:
      the paramters.
    • makeModelResult

      public StandardPrediction makeModelResult(float[] prob, double time)
      Overrides:
      makeModelResult in class GenericModelWorker
    • closeModel

      public void closeModel()
      Destroy the model.
      Overrides:
      closeModel in class GenericModelWorker
    • getModel

      public org.jamdev.jdl4pam.ArchiveModel getModel()
      Get the currently loaded mode.
      Overrides:
      getModel in class GenericModelWorker
      Returns:
      - the currently loaded mode.
    • isModelNull

      public boolean isModelNull()
      Description copied from class: DLModelWorker
      Check whether a model is null or not.
      Overrides:
      isModelNull in class GenericModelWorker
      Returns:
      true of the model is null.