Class DLDetection
java.lang.Object
PamguardMVC.PamDataUnit
rawDeepLearningClassifier.dlClassification.DLDetection
- All Implemented Interfaces:
Comparable
,PamDetection
,AcousticDataUnit
,RawDataHolder
A detected DL data unit. These data units are only ever generated from raw
sound data from the segmenter. Otherwise DL results are saved as annotations on
other data units.
- Author:
- Jamie Macaulay
-
Constructor Summary
ConstructorDescriptionDLDetection
(long timeMilliseconds, int channelBitmap, long startSample, long durationSamples, ArrayList<PredictionResult> modelResults, double[][] waveData) Deprecated.DLDetection
(DataUnitBaseData baseData, double[][] waveData) Create a data unit for DL which has passed binary classification. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataAnnotation
(DataAnnotation dataAnnotation) Adds a data annotation to the data unit.Get the raw data transforms class.Get the model results that were used to construct the data unit.double[][]
getPowerSpectrum
(int fftLength) Get the power spectrum for all channels.getSpectrogram
(int fftSize, int fftHop) Get a spectrogram image of the wave clip.double[][]
Get arrays of raw audio data, one per channel.Methods inherited from class PamguardMVC.PamDataUnit
addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAmplitudeDB, getAnnotationsSummaryString, getBasicData, getCalculatedAmlitudeDB, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, getFrequency, getFrequencyOverlap, getHydrophoneBitmap, getHydrophoneHeading, getLastChangeTime, getLastSample, getLastUpdateTime, getMeasuredAmplitude, getMeasuredAmplitudeType, getNoiseBackground, getNumDataAnnotations, getOriginLatLong, getParentDataBlock, getSampleDuration, getSampleDurationAsInt, getSeconds, getSequenceBitmap, getSequenceBitmapObject, getSignalExcess, getSignalSPL, getSnapshotGeometry, getStartSample, getSummaryString, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, getSuperId, getTimeDelaysSeconds, getTimeMilliseconds, getTimeNanoseconds, getTimeOverlap, getUID, getUpdateCount, isEmbryonic, isForceAmpRecalc, linAmplitudeToDB, removeDataAnnotation, removeDataAnnotation, removeSuperDetection, setAbsBlockIndex, setCalculatedAmlitudeDB, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setDurationInMilliseconds, setEmbryonic, setForceAmpRecalc, setFrequency, setInfo, setLastUpdateTime, setLocalisation, setMeasuredAmpAndType, setMeasuredAmplitude, setMeasuredAmplitudeType, setNoiseBackground, setParentDataBlock, setSampleDuration, setSequenceBitmap, setSignalExcess, setSignalSPL, setSnapshotGeometry, setStartSample, setTimeDelaysSeconds, setTimeMilliseconds, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit
-
Constructor Details
-
DLDetection
@Deprecated public DLDetection(long timeMilliseconds, int channelBitmap, long startSample, long durationSamples, ArrayList<PredictionResult> modelResults, double[][] waveData) Deprecated.Create a data unit for DL which has passed binary classification.- Parameters:
timeMilliseconds
- - the time in milliseconds.channelBitmap
- - the channel bit map.startSample
- - the start sample.durationSamples
- - the duration in samples.modelResults
- - the model results that were used to construct the data unit.
-
DLDetection
Create a data unit for DL which has passed binary classification. Usually used for loading data units from binary files.- Parameters:
baseData
- - the base binary data.waveData
- - the wave data.probdata
- - the probability data.
-
-
Method Details
-
addDataAnnotation
Description copied from class:PamDataUnit
Adds a data annotation to the data unit. Removes any existing annotation of the same type and name.- Overrides:
addDataAnnotation
in classPamDataUnit
- Parameters:
dataAnnotation
- data annotation
-
getLocalisation
- Overrides:
getLocalisation
in classPamDataUnit
- Returns:
- Returns the localisation.
-
getWaveData
public double[][] getWaveData()Description copied from interface:RawDataHolder
Get arrays of raw audio data, one per channel. Assume that the array matches getChannelMap() !- Specified by:
getWaveData
in interfaceRawDataHolder
- Returns:
- arrays of raw data by channel
-
getModelResults
Get the model results that were used to construct the data unit. The number of results will generally be the raw data length divided by hop size.- Returns:
- the model results.
-
getSpectrogram
Get a spectrogram image of the wave clip. The clip is null until called. It is recalculated if the FFT length and/or hop size are different.- Parameters:
fftSize
- - the FFT size in samplesfftHop
- - the FFT hop in samples- Returns:
- a spectrogram clip (dB/Hz ).
-
getPowerSpectrum
public double[][] getPowerSpectrum(int fftLength) Get the power spectrum for all channels.- Parameters:
fftLength
- - the fft length to use.- Returns:
- the power sepctrums for all channels.
-
getDataTransforms
Description copied from interface:RawDataHolder
Get the raw data transforms class. This handles standard data transforms that are often used in raw data units, e.g. calculating the spectrum, filtering waveforms, getting data as an int16 (short) array, etc.- Specified by:
getDataTransforms
in interfaceRawDataHolder
- Returns:
- the data transforms object.
-