Class SegmenterProcess
java.lang.Object
PamguardMVC.PamProcess
rawDeepLearningClassifier.segmenter.SegmenterProcess
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
Acquires raw sound data and then sends off to a deep learning classifier.
- Author:
- Jamie Macaulay
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA list of data block class types which are compatible as parent data blocks for the PamProcess.Get the segmenter data block.void
masterClockUpdate
(long milliSeconds, long sampleNumber) void
newClickData
(PamDataUnit pamRawData) Process new click data.void
newClipData
(PamDataUnit pamRawData) Process new clip data.void
newData
(PamDataUnit pamRawData) void
newData
(PamObservable obs, PamDataUnit pamRawData) void
newRawData
(PamDataUnit unit, double[] rawDataChunk, int iChan) Take a raw sound chunk of data and segment into discrete groups.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.void
newRawDataUnit
(PamDataUnit pamRawData) A new raw data unit.void
pamStart()
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).void
pamStop()
Stops the process.void
Called for each process before any of them receive the PamStart commandvoid
called for every process once the system model has been created.void
Set up the DL process.Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, noteNewSettings, notifyModelChanged, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setSampleRate, toString, updateData
-
Constructor Details
-
SegmenterProcess
-
-
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 classPamProcess
-
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 classPamProcess
- 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 classPamProcess
-
setupSegmenter
public void setupSegmenter()Set up the DL process. -
newData
- Overrides:
newData
in classPamProcess
-
newData
-
masterClockUpdate
public void masterClockUpdate(long milliSeconds, long sampleNumber) - Specified by:
masterClockUpdate
in interfacePamObserver
- Overrides:
masterClockUpdate
in classPamProcess
-
newRawDataUnit
A new raw data unit.- Parameters:
pamRawData
- - PAM raw data.obs
- - the PAM observable
-
newClipData
Process new clip data.- Parameters:
pamRawData
- - the new raw data unitobs
- - the PAM observable
-
newClickData
Process new click data.- Parameters:
pamRawData
-obs
- - the PAM observable
-
newRawData
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 segmentedrawSampleSize
- - 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 classPamProcess
-
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
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
-