Class SoundSpotClassifier

java.lang.Object
rawDeepLearningClassifier.dlClassification.StandardClassifierModel
rawDeepLearningClassifier.dlClassification.animalSpot.SoundSpotClassifier
All Implemented Interfaces:
PamSettings, SettingsNameProvider, DLClassiferModel

public class SoundSpotClassifier extends StandardClassifierModel
A deep learning classifier running models wihc have been created using the AnimalSpot framework .

AnimalSpot uses Pytorch models which contains a JSON string for the transforms Users can select a .py file - PAMGaurd will open it, find the embedded JSON string and set up the transforms.

This method has numerous advantages, it greatly simplifies the setup, which requires only that the pytorch TorchScript library is installed and that the library location is added to the virtual machine arguments e.g. -Djava.library.path=/Users/au671271/libtorch/lib

It also means that np python code is called which greatly increases speed.

Author:
JamieMacaulay
  • Constructor Details Link icon

    • SoundSpotClassifier Link icon

      public SoundSpotClassifier(DLControl dlControl)
  • Method Details Link icon

    • getName Link icon

      public String getName()
      Description copied from interface: DLClassiferModel
      Get the name of the model.
      Returns:
      the name of the model.
    • getModelUI Link icon

      public DLCLassiferModelUI getModelUI()
      Description copied from interface: DLClassiferModel
      Get any UI components for the model. Can be null.
      Returns:
      UI components for the model.
    • getDLModelSettings Link icon

      public Serializable getDLModelSettings()
      Description copied from interface: DLClassiferModel
      A settings object that can be saved.
      Returns:
      the settings object.
    • getUnitName Link icon

      public String getUnitName()
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType Link icon

      public String getUnitType()
      Returns:
      A Name specific to the type, e.g. Click detector
    • getSettingsReference Link icon

      public Serializable getSettingsReference()
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion Link icon

      public long getSettingsVersion()
      Returns:
      An integer version number for the settings
    • restoreSettings Link icon

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getSoundSpotParams Link icon

      public StandardModelParams getSoundSpotParams()
      Get the sound spot parameters.
      Returns:
      sound spot parameters.
    • setSoundSpotParams Link icon

      public void setSoundSpotParams(StandardModelParams soundSpotParmas)
      Set the sound spot parameters.
      Parameters:
      the - params to set
    • isModelType Link icon

      public boolean isModelType(URI uri)
      Description copied from interface: DLClassiferModel
      Check whether a URI is compatible with a classification framework
      Parameters:
      uri - - the URI to the model
      Returns:
      true if the model is compatible.
    • getDLWorker Link icon

      public DLModelWorker<StandardPrediction> getDLWorker()
      Description copied from class: StandardClassifierModel
      Get the sound spot worker.
      Specified by:
      getDLWorker in class StandardClassifierModel
      Returns:
      the sound spot worker.
    • getDLParams Link icon

      public StandardModelParams getDLParams()
      Description copied from class: StandardClassifierModel
      Get the sound spot worker.
      Specified by:
      getDLParams in class StandardClassifierModel
      Returns:
      the sound spot worker.