Skip to content

Commit

Permalink
Work on AUst bittern recognizer
Browse files Browse the repository at this point in the history
Issue #319 Start work on reducing FPs.
  • Loading branch information
towsey authored and atruskie committed May 29, 2020
1 parent 6818266 commit c680408
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

# Australasian Bittern
# Australasian Bittern = Botaurus poiciloptilus
# Resample rate must be 2 X the desired Nyquist
ResampleRate: 8000
# SegmentDuration: units=seconds;
Expand Down
16 changes: 6 additions & 10 deletions src/AnalysisPrograms/Recognizers/Birds/BotaurusPoiciloptilus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,18 @@ public override RecognizerResults Recognize(

//filter the events for duration in seconds
var minimumEventDuration = 0.5;
var maximumEventDuration = 2.0;
if (genericConfig.CombinePossibleSyllableSequence)
{
minimumEventDuration = 2.0;
}

var filteredEvents = new List<EventCommon>();
foreach (var ev in newEvents)
{
var eventDuration = ((SpectralEvent)ev).EventDurationSeconds;
if (eventDuration > minimumEventDuration && eventDuration < 11.0)
{
filteredEvents.Add(ev);
}
}
combinedResults.NewEvents = SpectralEvent.FilterOnDuration(newEvents, minimumEventDuration, maximumEventDuration);

combinedResults.NewEvents = filteredEvents;
double average = 365;
double sd = 22;
double sigmaThreshold = 3.0;
combinedResults.NewEvents = SpectralEvent.FilterOnBandwidth(combinedResults.NewEvents, average, sd, sigmaThreshold);

//UNCOMMENT following line if you want special debug spectrogram, i.e. with special plots.
// NOTE: Standard spectrograms are produced by setting SaveSonogramImages: "True" or "WhenEventsDetected" in UserName.SpeciesName.yml config file.
Expand Down

0 comments on commit c680408

Please sign in to comment.