Skip to content

Commit

Permalink
Final tweaks to NSW DPI recognisers
Browse files Browse the repository at this point in the history
Had to fix a few given recent changes to post-processing.
  • Loading branch information
atruskie committed Apr 9, 2021
1 parent 473f924 commit 8843d23
Show file tree
Hide file tree
Showing 10 changed files with 285 additions and 171 deletions.
2 changes: 1 addition & 1 deletion docs/basics/config_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Here are some **invalid** examples:
_AP_ looks for an analysis called `Towsey.Acousticmarine` which doesn't exist. It should be `Towsey.Acoustic.marine.yml`

If you find a config file that does not match this format, it will likely produce an error.
If your config file must be named in a different format the `--analysis-name` (or the short form `-a`) argument can be used to
If your config file must be named in a different format the `--analysis-identifier` (or the short form `-a`) argument can be used to
disambiguate the analysis type you want to use.

Please note this rule does not apply to other config files not directly used by `audio2csv`. For example,
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/generic_recognizers.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ the names of the algorithms (used to find those events) describe how the algorit
| Whistle | `OnebinTrack` | `!OnebinTrackParameters` |
| Chirp | `ForwardTrack` | `!ForwardTrackParameters` |
| Whip | `UpwardTrack` | `!UpwardTrackParameters` |
| Click | `VerticalTrack` | `!VerticalTrackParameters` |
| Click | `VerticalTrack` | `!OneframeTrackParameters` |
| Oscillation | `Oscillation` | `!OscillationParameters` |
| Harmonic | `Harmonic` | `!HarmonicParameters` |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Resample rate must be 2 X the desired Nyquist
#ResampleRate: 22050
# SegmentDuration: units=seconds;
# SegmentDuration: units=seconds;
SegmentDuration: 60
# SegmentOverlap: units=seconds;
SegmentOverlap: 0
Expand All @@ -20,14 +20,14 @@ SegmentOverlap: 0
# This profile is required for the species-specific recogniser and must have the current name.
Profiles:
StrenuaSyllable: !ForwardTrackParameters
ComponentName: RidgeTrack
ComponentName: RidgeTrack
SpeciesName: NinoxStrenua
FrameSize: 1024
FrameStep: 256
WindowFunction: HANNING

# min and max of the freq band to search
MinHertz: 300
MinHertz: 300
MaxHertz: 600
MinDuration: 0.3
MaxDuration: 0.6
Expand All @@ -38,7 +38,7 @@ Profiles:
- 24.0
- 30.0
- 36.0

#################### POST-PROCESSING of EVENTS ###################

PostProcessing:
Expand All @@ -63,7 +63,7 @@ PostProcessing:
# 3: Remove events whose duration lies outside 3 SDs of an expected value.
#Duration:
# ExpectedDuration: 0.14
# DurationStandardDeviation: 0.01
# DurationStandardDeviation: 0.01

# 4: Remove events whose bandwidth lies outside 3 SDs of an expected value.
Bandwidth:
Expand All @@ -77,7 +77,7 @@ PostProcessing:
MaxBackgroundDecibels: null
MaxActivityDecibels: null

# 6: In the case of sets of nested/enclosed events, filter/remove all but the outermost event.
# 6: In the case of sets of nested/enclosed events, filter/remove all but the outermost event.
RemoveEnclosedEvents: true


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
# Second version adapted to generic recognizer format by Anthony Truskinger
SpeciesName: Pteropus
CommonName: Flying Fox

# Proposed Approach:
# Typically the lowest harmonic will lie between 1200 Hz and 3000 Hz and the higher ones evenly spaced.
# This is the tricky bit due to variability but may work to use spectrum auto-correlation.

ResampleRate: 22050
SegmentDuration: 60
SegmentOverlap: 0

CommonParameters: &common_parameters
SpeciesName: Pteropus
FrameSize: 512
FrameStep: 256
WindowFunction: HANNING
NoiseReductionType: Standard
BgNoiseThreshold: 3
# Scan the frequency band at these thresholds
DecibelThresholds:
- 6.0


# Each of these profiles will be analyzed
Profiles:
Territorial: !HarmonicParameters
<<: *common_parameters

# min and max of the freq band to search
MinHertz: 800
MaxHertz: 8000
MinDuration: 0.15
MaxDuration: 0.8
MinFormantGap: 150
MaxFormantGap: 7200
DctThreshold: 0.15
Wingbeats: !OscillationParameters
<<: *common_parameters

MinHertz: 200
MaxHertz: 2000
DecibelThreshold: 6.0
# duration of DCT in seconds
DctDuration: 0.5
# minimum acceptable value of a DCT coefficient
DctThreshold: 0.5
# ignore oscillation rates below the min & above the max threshold
# A sample of four wingbeats yielded an average of 5.1 +/-0.5 beats/s.
# 95% confidence interval (2 SDs) is therefore approx 4-6 beats/s.
# OSCILLATIONS PER SECOND
MinOscillationFrequency: 4
MaxOscillationFrequency: 6
# Minimum and maximum duration for the length of a true call.
MinDuration: 1.0
MaxDuration: 10.0
# Event threshold - use this to determine FP / FN trade-off for events.
EventThreshold: 0.5


SaveIntermediateWavFiles: Never
SaveIntermediateCsvFiles: false
SaveSonogramImages: WhenEventsDetected
...
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AbbreviatedSpeciesName: PteropusSp
# Resample rate must be 2 X the desired Nyquist
ResampleRate: 22050

# SegmentDuration: units=seconds;
# SegmentDuration: units=seconds;
SegmentDuration: 60
# SegmentOverlap: units=seconds;
SegmentOverlap: 0
Expand All @@ -34,24 +34,24 @@ Profiles:
#EventThreshold: 0.2
Territorial:
# min and max of the freq band to search
MinHz: 800
MinHz: 800
MaxHz: 8000
MinDuration: 0.15
MaxDuration: 0.8
DecibelThreshold: 9.0
DecibelThresholds: 9.0
Wingbeats:
MinHz: 200
MinHz: 200
MaxHz: 2000
DecibelThreshold: 6.0
# duration of DCT in seconds
# duration of DCT in seconds
DctDuration: 0.5
# minimum acceptable value of a DCT coefficient
DctThreshold: 0.5
# ignore oscillation rates below the min & above the max threshold
# A sample of four wingbeats yielded an average of 5.1 +/-0.5 beats/s.
# 95% confidence interval (2 SDs) is therefore approx 4-6 beats/s.
# 95% confidence interval (2 SDs) is therefore approx 4-6 beats/s.
# OSCILLATIONS PER SECOND
MinOscilFreq: 4
MinOscilFreq: 4
MaxOscilFreq: 6
# Minimum and maximum duration for the length of a true call.
MinDuration: 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ CommonParameters: &common_parameters
FrameStep: 512
WindowFunction: HAMMING
NoiseReductionType: Modal
BgNoiseThreshold: 0.2
BgNoiseThreshold: 0.1

# Scan the frequency band at these thresholds
DecibelThresholds:
- 2
- 3
- 6
- 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,89 +8,87 @@ SegmentDuration: 60
# SegmentOverlap: units=seconds;
SegmentOverlap: 0

CommonParameters: &common_parameters
SpeciesName: Petaurus australis
FrameSize: 512
FrameStep: 512
WindowFunction: HANNING
NoiseReductionType: Modal
BgNoiseThreshold: 0.0


# Each of these profiles will be analyzed
# This profile is required for the species-specific recognizer and must have the current name.
Profiles:
YellowBelliedGlider_FirstShriek: !BlobParameters
SpeciesName: Petaurus australis
FrameSize: 1024
FrameStep: 256
WindowFunction: HANNING
FirstShriek: !BlobParameters
<<: *common_parameters

# min and max of the freq band to search
MinHertz: 1200
MaxHertz: 2100
BottomHertzBuffer: 100
TopHertzBuffer: 100
MinDuration: 0.4
MinHertz: 270
MaxHertz: 3300
BottomHertzBuffer: 0
TopHertzBuffer: 0
MinDuration: 0.1
MaxDuration: 0.6
# Scan the frequency band at these thresholds
DecibelThresholds:
- 1.0
- 3.0
- 3
- 6.0
YellowBelliedGlider2_SecondShriek: !BlobParameters
SpeciesName: Petaurus australis
FrameSize: 1024
FrameStep: 256
WindowFunction: HANNING
- 9.0
SecondShriek: !BlobParameters
<<: *common_parameters

# min and max of the freq band to search
MinHertz: 2200
MaxHertz: 3550
MinHertz: 2000
MaxHertz: 6500
BottomHertzBuffer: 100
TopHertzBuffer: 50
MinDuration: 0.6
MaxDuration: 0.8
MinDuration: 0.5
MaxDuration: 1.5
# Scan the frequency band at these thresholds
DecibelThresholds:
- 1.0
- 3.0
- 6.0
YellowBelliedGlider3_TrailingShriek: !BlobParameters
SpeciesName: Petaurus australis
FrameSize: 1024
FrameStep: 256
WindowFunction: HANNING
TrailingShriek: !BlobParameters
<<: *common_parameters

# min and max of the freq band to search
MinHertz: 1200
MaxHertz: 2100
MinHertz: 200
MaxHertz: 5400
BottomHertzBuffer: 100
TopHertzBuffer: 100
MinDuration: 0.6
MinDuration: 0.15
MaxDuration: 2.0
# Scan the frequency band at these thresholds
DecibelThresholds:
- 1.0
- 3.0
- 6.0

#################### POST-PROCESSING of EVENTS ###################

PostProcessing:
PostProcessInDecibelGroups: false
# # The following generic post-processing steps are determined by config settings.
# # Step 1: Combine overlapping events - events derived from all profiles.
# # Step 2: Combine possible syllable sequences and filter on excess syllable count.
# # Step 3: Remove events whose bandwidth is too small or large.
# # Step 4: Remove events that have excessive noise in their side-bands.

# # 1: Combine overlapping events
# CombineOverlappingEvents: true
CombineOverlappingEvents: false

# 2: Combine possible syllable sequences
SyllableSequence:
CombinePossibleSyllableSequence: true
SyllableStartDifference: 0.6
SyllableStartDifference: 1.2
SyllableHertzGap: 2400
FilterSyllableSequence: true
SyllableMaxCount: 3
ExpectedPeriod: 0.1
# FilterSyllableSequence: true
# SyllableMaxCount: 3
# ExpectedPeriod: 0.1

# # 3: Remove events whose duration lies outside 3 SDs of an expected value.
# #Duration:
# ExpectedDuration: 0.14
# DurationStandardDeviation: 0.01
# # # 3: Remove events whose duration lies outside 3 SDs of an expected value.
Duration:
ExpectedDuration: 2.5
DurationStandardDeviation: 0.6

# # 4: Remove events whose bandwidth lies outside 3 SDs of an expected value.
# # Bandwidth:
Expand All @@ -102,11 +100,12 @@ PostProcessing:
# LowerHertzBuffer: 150
# UpperHertzBuffer: 400
# MaxAverageSidebandDecibels: 3.0
RemoveEnclosedEvents: false

# Options to save results files
# Available options for saving spectrograms (case-sensitive): [False/Never | True/Always | WhenEventsDetected]
# "True" is useful when debugging but "WhenEventsDetected" is required for operational use.
SaveSonogramImages: WhenEventsDetected
SaveSonogramImages: Always

# Available options for saving data files (case-sensitive): [False/Never | True/Always | WhenEventsDetected]
SaveIntermediateWavFiles: Never
Expand Down
Loading

0 comments on commit 8843d23

Please sign in to comment.