Skip to content

Commit

Permalink
Experiment with best test parameters.
Browse files Browse the repository at this point in the history
Issue #500
  • Loading branch information
towsey committed Jul 1, 2021
1 parent 94b9aaf commit ccc8f31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Male Koala: Phascolarctos cinereus version 3.
# Resample rate must be 2 X the desired Nyquist
#ResampleRate: 20480
ResampleRate: 22050
# SegmentDuration: units=seconds;
SegmentDuration: 60
Expand All @@ -22,9 +23,10 @@ Profiles:
<<: *common_parameters

Algorithm: Standard
#Algorithm: Hits
ComponentName: Oscillation
FrameSize: 512
FrameStep: 256
FrameSize: 256
FrameStep: 100
# min and max of the freq band to search
MinHertz: 200
MaxHertz: 800
Expand All @@ -38,12 +40,12 @@ Profiles:
# minimum acceptable amplitude of a DCT coefficient
DctThreshold: 0.5
# OSCILLATIONS PER SECOND: ignore oscillation rates below the min & above the max threshold
MinOscillationFrequency: 20
MinOscillationFrequency: 15
MaxOscillationFrequency: 60
# Event threshold - Determines FP / FN trade-off for events.
EventThreshold: 0.2
EventThreshold: 0.4
DecibelThresholds:
- 6.0
- 3.0

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Acoustics.Test.AnalysisPrograms.Recognizers
using global::AudioAnalysisTools.Events.Types;
using global::AudioAnalysisTools.WavTools;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static global::AnalysisPrograms.Recognizers.PhascolarctosCinereusMark3;

// [Ignore("Currently failing but also this work has not yet been implemented")]

Expand Down Expand Up @@ -62,21 +63,22 @@ public void TestKoala3Recognizer()
this.SaveTestOutput(
outputDirectory => GenericRecognizer.SaveDebugSpectrogram(results, null, outputDirectory, Recognizer.SpeciesName));

Assert.AreEqual(12, events.Count);
Assert.AreEqual(9, events.Count);
Assert.IsNull(scoreTrack);
Assert.AreEqual(2, plots.Count);
//Assert.AreEqual(938, sonogram.FrameCount);
Assert.AreEqual(2299, sonogram.FrameCount);

Assert.IsInstanceOfType(events[0], typeof(OscillationEvent));

var ev = (SpectralEvent)events[0];
var ev = (OscillationEvent)events[3];

Assert.AreEqual(5.12, ev.EventStartSeconds);
Assert.AreEqual(12.26, ev.EventEndSeconds);
Assert.AreEqual(10.67, ev.EventStartSeconds, 0.05);
Assert.AreEqual(12.26, ev.EventEndSeconds, 0.05);
Assert.AreEqual(105, ev.LowFrequencyHertz);
Assert.AreEqual(180, ev.HighFrequencyHertz);
Assert.AreEqual(21.7, ev.Score);
Assert.AreEqual(0.95, ev.ScoreNormalized);
Assert.AreEqual(21.7, ev.Score, 0.05);
Assert.AreEqual(0.95, ev.Periodicity, 0.05);
Assert.AreEqual(0.95, ev.OscillationRate, 0.05);
}
}
}

0 comments on commit ccc8f31

Please sign in to comment.