Class SegmenterProcess

java.lang.Object
PamguardMVC.PamProcess
rawDeepLearningClassifier.segmenter.SegmenterProcess
All Implemented Interfaces:
PamObserver, ProcessAnnotator

public class SegmenterProcess extends PamProcess
Acquires raw sound data and then sends off to a deep learning classifier.
Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • prepareProcess

      public void prepareProcess()
      Description copied from class: PamProcess
      Called for each process before any of them receive the PamStart command
      Overrides:
      prepareProcess in class PamProcess
    • getCompatibleDataUnits

      public ArrayList getCompatibleDataUnits()
      A list of data block class types which are compatible as parent data blocks for the PamProcess. This can return null, e.g. in the case of Acquisition process.
      Overrides:
      getCompatibleDataUnits in class PamProcess
      Returns:
      a list of PamDataBlock sub class types which can be used as parent data blocks for the process.
    • setupProcess

      public void setupProcess()
      called for every process once the system model has been created. this is a good time to check out and find input data blocks and similar tasks.
      Overrides:
      setupProcess in class PamProcess
    • setupSegmenter

      public void setupSegmenter()
      Set up the DL process.
    • newData

      public void newData(PamObservable obs, PamDataUnit pamRawData)
      Overrides:
      newData in class PamProcess
    • newData

      public void newData(PamDataUnit pamRawData)
    • masterClockUpdate

      public void masterClockUpdate(long milliSeconds, long sampleNumber)
      Specified by:
      masterClockUpdate in interface PamObserver
      Overrides:
      masterClockUpdate in class PamProcess
    • newRawDataUnit

      public void newRawDataUnit(PamDataUnit pamRawData)
      A new raw data unit.
      Parameters:
      pamRawData - - PAM raw data.
      obs - - the PAM observable
    • newClipData

      public void newClipData(PamDataUnit pamRawData)
      Process new clip data.
      Parameters:
      pamRawData - - the new raw data unit
      obs - - the PAM observable
    • newClickData

      public void newClickData(PamDataUnit pamRawData)
      Process new click data.
      Parameters:
      pamRawData -
      obs - - the PAM observable
    • newRawData

      public void newRawData(PamDataUnit unit, double[] rawDataChunk, int iChan)
      Take a raw sound chunk of data and segment into discrete groups. This handles many situations e.g. where the segment is much larger than the raw data or where the segment is much small than each rawDataChunk returning multiple segments.
      Parameters:
      unit - - the data unit which contains relevant metadata on time etc.
      rawDataChunk - - the sound chunk to segment extracted form the data unit.
      iChan - - the channel that is being segmented
    • newRawData

      public void newRawData(PamDataUnit unit, double[] rawDataChunk, int iChan, int rawSampleSize, int rawSampleHop, boolean forcesave)
      Take a raw sound chunk of data and segment into discrete groups. This handles many situations e.g. where the segment is much larger than the raw data or where the segment is much small than each rawDataChunk returning multiple segments.
      Parameters:
      unit - - the data unit which contains relevant metadata on time etc.
      rawDataChunk - - the sound chunk extracted from the data unit.
      iChan - - the channel that is being segmented
      rawSampleSize - - the segment size in samples i.e. the size of the segmenting window.
      rawSampleHop - - the segment hop in samples i.e. how far the window jumps for each segment.
      forceSave - - make sure that all data is passed into the buffers and do not wait for the next data unit. This is used to make sure that discrete chunks have their full number of segments saved.
    • pamStart

      public void pamStart()
      Description copied from class: PamProcess
      Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).
      Specified by:
      pamStart in class PamProcess
    • pamStop

      public void pamStop()
      Description copied from class: PamProcess
      Stops the process.
      Specified by:
      pamStop in class PamProcess
    • getSegmenterDataBlock

      public SegmenterDataBlock getSegmenterDataBlock()
      Get the segmenter data block. This holds raw chunks of data to be sent to the deep learning classifier.
      Returns:
      the segmenter data block.
    • getSegmenteGrouprDataBlock

      public SegmenterGroupDataBlock getSegmenteGrouprDataBlock()