java.lang.Object
rawDeepLearningClassifier.dlClassification.delphinID.DelphinIDUtils

public class DelphinIDUtils extends Object
A bunch of utility functions that a re useful for testing and running DelphinID models
  • Constructor Details

    • DelphinIDUtils

      public DelphinIDUtils()
  • Method Details

    • prepDelphinIDModel

      public static DelphinIDTest.DelphinIDWorkerTest prepDelphinIDModel(String modelPath)
    • getWhistleContoursMAT

      public static ArrayList<AbstractWhistleDataUnit> getWhistleContoursMAT(String filePath)
      Load whistle contours from a MAT file. ()
      Parameters:
      filePath - - the file path.
      Returns:
      a list of whistle contour objects from the mat file.
    • getWhistleContoursMAT

      public static ArrayList<AbstractWhistleDataUnit> getWhistleContoursMAT(us.hebi.matlab.mat.types.Struct whistlesStruct, double fftLen, double fftHop, double sampleRate)
      Load whistle contours from a MATLAB struct
      Parameters:
      whistlesStruct - - a struct containing a list of whistle contours
      fftLen - - the fft length in samples
      fftHop - - the fft hop in samples.
      sampleRate - - the sample rate in samples per second.
      Returns:
      a list of whistle contour objects from the struct.
    • segmentWhsitleData

      public static ArrayList<SegmenterDetectionGroup> segmentWhsitleData(ArrayList<AbstractWhistleDataUnit> whistles, long dataStartMillis, double segLen, double segHop)
      Segment the detections into groups. Note that segments are overlaps so each whistle may belong to multiple segments.
      Parameters:
      whistles - - a list of whistles - not necessarily sorted by time.
      dataStartMillis - - the start time of the data in millis i.e. where the first segment starts.
      segLen - - the segment size in milliseconds.
      segHop - - the segment hop in milliseconds.
      Returns:
      groups of data units within each segment.
    • main

      public static void main(String[] args)