Skip to content

Commit

Permalink
work on frog recogniser
Browse files Browse the repository at this point in the history
Work on Limnodynastes convex frog recognizer. With a lot of resharper
stuff on the way
  • Loading branch information
towsey committed Aug 4, 2017
1 parent fc453b1 commit b91d044
Show file tree
Hide file tree
Showing 9 changed files with 755 additions and 346 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ AnalysisName: Ecosounds.MultiRecognizer
SpeciesList:
# - Towsey.CriniaRemota
- Towsey.LimnodynastesConvex
- Towsey.LitoriaBicolor
# - Towsey.LitoriaBicolor
# - Towsey.LitoriaCaerulea
# - Towsey.LitoriaFallax
# - Towsey.LitoriaNasuta
# - Towsey.LitoriaPallida
- Towsey.LitoriaRothii
- Towsey.LitoriaRubella
# - Towsey.LitoriaRothii
# - Towsey.LitoriaRubella
# - Towsey.LitoriaWatjulumensis
# - Towsey.PlatyplectrumOrnatum
- Towsey.RhinellaMarina
# - Towsey.RhinellaMarina
# - Towsey.UperoleiaInundata
# - Towsey.UperoleiaLithomoda

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ AbbreviatedSpeciesName: L.convex
#DoNoiseReduction: true
BgNoiseThreshold: 0.1

# The Limnodynastes convex call has three major peaks. The dominant peak is at 1850 or as set above.
# The second and third peak are at equal gaps below. i.e. dominantFreq-gap and dominantFreq-(2*gap);
# Set the gap here: should be in range 880 to 970
DominantFrequency: 1850
# The Limnodynastes convex call has three major peaks. The dominant peak is at 1850 or as set below.
# The second and third peaks are at equal gaps below. i.e. dominantFreq-gap and dominantFreq-(2*gap);
# Set the gap here: should be in range 440 to 500
TopFrequency: 2100

# Possible future additional parameters to control required call characteristics.
# Possible future additional parameter to control required call characteristics.
# PeakGap: 470
# MinHz: 850

# Decibel threshold for the dominant peak: Use this to require a minimum decibel SNR value for a valid call.
PeakThreshold: 10.0
PeakThresholdDecibels: 6.0
# Event threshold - use this to determine FP / FN trade-off for events. CosineSimilarity to template in 0,1.
EventThreshold: 0.2
EventThreshold: 0.5

################################################################################
# Available options (case-sensitive): [False/Never | True/Always | WhenEventsDetected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static Arguments Dev()

// TESTING for Sheryn Brodie
// This is a six-hour recording and quite good for debugging calculation of acoustic indices
string recordingPath = @"D:\SensorNetworks\WavFiles\Frogs\SherynBrodie\con1To6.wav";
//string recordingPath = @"D:\SensorNetworks\WavFiles\Frogs\SherynBrodie\con1To6.wav";
string outputPath = @"D:\SensorNetworks\Output\Frogs\TestOfRecognizers-2017August\";
string configPath = @"C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisConfigFiles\RecognizerConfigFiles\Ecosounds.MultiRecognizer.yml";

Expand Down Expand Up @@ -162,7 +162,7 @@ public static Arguments Dev()
// OTHER FROGS
//string recordingPath = @"C:\SensorNetworks\WavFiles\Frogs\LimnodynastesSpecies\3mile_creek_dam_-_Herveys_Range_1076_248366_20130305_001700_30.wav";
//string recordingPath = @"G:\SensorNetworks\WavFiles\Frogs\LitoriaSpecies\LitOlong.wav";
//string recordingPath = @"G:\SensorNetworks\WavFiles\Frogs\Limnodynastes_convexiusculus\10 Limnodynastes convexiusculus.mp3";
string recordingPath = @"G:\SensorNetworks\WavFiles\Frogs\Limnodynastes_convexiusculus\10 Limnodynastes convexiusculus.mp3";
//string recordingPath = @"G:\SensorNetworks\WavFiles\Frogs\LitoriaSp\53 Litoria fallax.mp3";
//string recordingPath = @"G:\SensorNetworks\WavFiles\Frogs\.mp3";
//string recordingPath = @"C:\SensorNetworks\WavFiles\Frogs\FrogRecording_2.wav";
Expand Down
15 changes: 10 additions & 5 deletions AudioAnalysis/AnalysisPrograms/Recognizers/Base/RecognizerEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ namespace AnalysisPrograms.Recognizers.Base

public class RecognizerEntry
{
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

[CustomDetailedDescription]
public class Arguments : SourceConfigOutputDirArguments
{
Expand All @@ -35,20 +37,22 @@ public static string AdditionalNotes()
}
}

private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

public static Arguments Dev()
{
Log.Info("Runnung Event Recognizer through the RecognizerEntry.Dev() method.");

// The MULTI-RECOGNISER
/*
// Canetoad, Litoria fallax and Limnodynastes convex.
//string recordingPath = @"C:\SensorNetworks\WavFiles\Frogs\3mile_creek_dam_-_Herveys_Range_1076_248366_20130305_001700_30.wav";
//string recordingPath = @"G:\SensorNetworks\WavFiles\Frogs\MultiLabel\Gympie_CaneToad_Lnasuta_Lfallax.wav";
//string outputPath = @"G:\SensorNetworks\Output\Frogs\Multirecognizer_2016December";
*/
string recordingPath = @"C:\SensorNetworks\WavFiles\Frogs\LitoriaSpecies\LitoriaWotjulumensisAndRothii\Lrothii_emerald_river_1014_252497_20131216_180244_30_0.wav";

//string recordingPath = @"C:\SensorNetworks\WavFiles\Frogs\LitoriaSpecies\LitoriaWotjulumensisAndRothii\Lrothii_emerald_river_1014_252497_20131216_180244_30_0.wav";
//string recordingPath = @"D:\SensorNetworks\WavFiles\Frogs\SherynBrodie\Lconvex_Lbicolor_GolfC_20170213_183122.wav";
string configPath = @"C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisConfigFiles\RecognizerConfigFiles\Ecosounds.MultiRecognizer.yml";
string outputPath = @"D:\SensorNetworks\Output\Frogs\TestOfRecognizers-2017August\";
string outputPath = @"D:\SensorNetworks\Output\Frogs\TestOfRecognizers-2017August";

//Ardea insignis (The White-bellied Herron
//string recordingPath = @"G:\SensorNetworks\WavFiles\Bhutan\Heron_commonCall_downsampled.wav";
Expand Down Expand Up @@ -125,6 +129,7 @@ public static Arguments Dev()
*/

// Limnodynastes convex
string recordingPath = @"D:\SensorNetworks\WavFiles\Frogs\LimnodynastesSpecies\10 Limnodynastes convexiusculusMONO.wav";
//string recordingPath = @"C:\SensorNetworks\WavFiles\Frogs\3mile_creek_dam_-_Herveys_Range_1076_248366_20130305_001700_30.wav";
//string outputPath = @"C:\SensorNetworks\Output\Frogs\TestOfRecognizers-2016Sept\LimnoConvex";
//string configPath = @"C:\Work\GitHub\audio-analysis\AudioAnalysis\AnalysisConfigFiles\RecognizerConfigFiles\Towsey.LimnodynastesConvex.yml";
Expand Down Expand Up @@ -322,7 +327,7 @@ public static void Execute(Arguments arguments)
}

int eventCount = results?.Events?.Length ?? 0;
LoggedConsole.WriteLine($"Number of detected events: {eventCount}");
Log.Info($"Number of detected events: {eventCount}");
Log.Success(recognizer.Identifier + " recognizer has completed");
}
}
Expand Down
Loading

0 comments on commit b91d044

Please sign in to comment.