Skip to content

Commit

Permalink
Updated all recognisers with new metadata fields
Browse files Browse the repository at this point in the history
Also removed a few that were plain broken and definitely unused
  • Loading branch information
atruskie committed Apr 9, 2021
1 parent 7f29c61 commit 5d277a6
Show file tree
Hide file tree
Showing 44 changed files with 171 additions and 61 deletions.
2 changes: 2 additions & 0 deletions src/AnalysisBase/AbstractStrongAnalyser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public abstract class AbstractStrongAnalyser : IAnalyser2
/// <inheritdoc/>
public virtual AnalysisSettings DefaultSettings => new AnalysisSettings();

public abstract Status Status { get; }

/// <inheritdoc cref="IAnalyser2.ParseConfig"/>
public virtual AnalyzerConfig ParseConfig(FileInfo file)
{
Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisBase/IHasStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ namespace AnalysisBase
{
public interface IHasStatus
{
public Status Status => Status.Unknown;
public Status Status { get; }
}
}
29 changes: 28 additions & 1 deletion src/AnalysisBase/Status.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IAnalyser2.cs" company="QutEcoacoustics">
// <copyright file="Status.cs" company="QutEcoacoustics">
// All code in this file and all associated files are the copyright and property of the QUT Ecoacoustics Research Group (formerly MQUTeR, and formerly QUT Bioacoustics Research Group).
// </copyright>
// <summary>
Expand All @@ -13,12 +13,39 @@ namespace AnalysisBase
{
public enum Status
{
/// <summary>
/// Unknown or not set.
/// </summary>
Unknown = 0,

/// <summary>
/// Code exists and it may run without failure.
/// </summary>
InDevelopment,

/// <summary>
/// The analysis works as determined by at least one unit test.
/// </summary>
Alpha,

/// <summary>
/// The analysis is covered by a suite of external tests as well as internal unit tests.
/// </summary>
Beta,

/// <summary>
/// Works, internal tests, external tests, wide spread utility.
/// </summary>
Maintained,

/// <summary>
/// Not maintined, or updated. May work but most likely stale and out of date.
/// </summary>
Unmaintained,

/// <summary>
/// Does not work, or you are advised not to use due to fundamental problems.
/// </summary>
Retired,
}
}
2 changes: 2 additions & 0 deletions src/AnalysisPrograms/AED.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public AedConfiguration()
/// </summary>
public override string Identifier => EcosoundsAedIdentifier;

public override Status Status => Status.Maintained;

public static Tuple<EventCommon[], AudioRecording, BaseSonogram> Detect(
FileInfo audioFile,
AedConfiguration aedConfiguration,
Expand Down
4 changes: 3 additions & 1 deletion src/AnalysisPrograms/AcousticIndices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class AcousticIndices : IAnalyser2
public string Identifier => TowseyAcoustic;

public string Description
=> "[BETA] Generates all our default summary & spectral acoustic indices. Also generates false color spectrograms IFF IndexCalculationDuration==60.0";
=> "Generates all our default summary & spectral acoustic indices. Also generates false color spectrograms IFF IndexCalculationDuration==60.0";

public void BeforeAnalyze(AnalysisSettings analysisSettings)
{
Expand Down Expand Up @@ -489,5 +489,7 @@ public static IndexCalculateResult[] CalculateIndicesInSubsegments(
SegmentMediaType = MediaTypes.MediaTypeWav,
SegmentOverlapDuration = TimeSpan.Zero,
};

public Status Status => Status.Maintained;
}
}
2 changes: 2 additions & 0 deletions src/AnalysisPrograms/Audio2InputForConvCNN.cs
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ public PreprocessorForConvDnn()

public AnalysisSettings DefaultSettings { get; private set; }

public Status Status => Status.Unmaintained;

public AnalyzerConfig ParseConfig(FileInfo file)
{
return ConfigFile.Deserialize<AnalyzerConfig>(file);
Expand Down
2 changes: 2 additions & 0 deletions src/AnalysisPrograms/ChannelIntegrity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class ChannelIntegrityAnalyzer : AbstractStrongAnalyser

public override string Identifier => "Towsey.ChannelIntegrity";

public override Status Status => Status.Alpha;

public override AnalysisResult2 Analyze<T>(AnalysisSettings analysisSettings, SegmentSettings<T> segmentSettings)
{
// boilerplate Analyzer
Expand Down
2 changes: 2 additions & 0 deletions src/AnalysisPrograms/ContentDescription/UseModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public class UseModel : AbstractStrongAnalyser
AnalysisTargetSampleRate = ContentSignatures.SampleRate,
};

public override Status Status => Status.InDevelopment;

public override void BeforeAnalyze(AnalysisSettings analysisSettings)
{
// Read in the functional templates file. These doe the content description.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class EventStatisticsAnalysis : AbstractStrongAnalyser

public override string Identifier { get; } = "Ecosounds.EventStatistics";

public override string Description { get; } = "[BETA] Calculates useful statistics (features) from an acoustic event";
public override string Description { get; } = "Calculates useful statistics (features) from an acoustic event";

public override AnalysisSettings DefaultSettings { get; } = new AnalysisSettings
{
Expand All @@ -41,6 +41,8 @@ public class EventStatisticsAnalysis : AbstractStrongAnalyser
AnalysisTargetSampleRate = null,
};

public override Status Status => Status.Maintained;

public override AnalyzerConfig ParseConfig(FileInfo file)
{
return ConfigFile.Deserialize<EventStatisticsConfiguration>(file);
Expand Down
4 changes: 3 additions & 1 deletion src/AnalysisPrograms/GroundParrotRecogniser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class GroundParrotRecogniser : AbstractStrongAnalyser
private const string EcosoundsGroundParrotIdentifier = "Ecosounds.GroundParrot";
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

public override string Description => "[UNMAINTAINED] Uses event pattern recognition for ground-parrots";
public override string Description => "Uses event pattern recognition for ground-parrots";

[Command(
CommandName,
Expand Down Expand Up @@ -275,6 +275,8 @@ public static List<AcousticEvent> ReadGroundParrotTemplateAsList(BaseSonogram so

public override string Identifier => EcosoundsGroundParrotIdentifier;

public override Status Status => Status.Unmaintained;

public override AnalysisResult2 Analyze<T>(AnalysisSettings analysisSettings, SegmentSettings<T> segmentSettings)
{
FileInfo audioFile = segmentSettings.SegmentAudioFile;
Expand Down
4 changes: 3 additions & 1 deletion src/AnalysisPrograms/KoalaMale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class KoalaMale : AbstractStrongAnalyser

public const int ResampleRate = 17640;

public override string Description => "[BETA/EXPERIMENTAL] Recogniser for male koalla bellow. Detects inhalation oscillations.";
public override string Description => "Recogniser for male koalla bellow. Detects inhalation oscillations.";

public string DefaultConfiguration => string.Empty;

Expand All @@ -74,6 +74,8 @@ public class KoalaMale : AbstractStrongAnalyser

public override string Identifier => "Towsey." + AnalysisName;

public override Status Status => Status.Unmaintained;

public static KoalaMaleResults Analysis(FileInfo segmentOfSourceFile, IDictionary<string, string> configDict, TimeSpan segmentStartOffset)
{
var recording = new AudioRecording(segmentOfSourceFile.FullName);
Expand Down
4 changes: 4 additions & 0 deletions src/AnalysisPrograms/Recognizers/Base/MultiRecognizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public class MultiRecognizerConfig : RecognizerConfig

public override string SpeciesName => "MultiRecognizer";

public override string CommonName => string.Empty;

public override Status Status => Status.Unmaintained;

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

public override AnalyzerConfig ParseConfig(FileInfo file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ internal class AnthusNovaeseelandiae : RecognizerBase

public override string Description => "[ALPHA] Designed to detect chirrup calls of the Australian Pipit.";

public override string CommonName => "Australasian pipit";

public override Status Status => Status.Alpha;

public override AnalyzerConfig ParseConfig(FileInfo file)
{
RuntimeHelpers.RunClassConstructor(typeof(PipitConfig).TypeHandle);
Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Birds/ArdeaInsignis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ namespace AnalysisPrograms.Recognizers.Birds
/// </summary>
public class ArdeaInsignis : RecognizerBase
{
public override string Description => "[BETA/Experimental] White Heron - Bhutan";
public override string Description => "White Heron - Bhutan";

public override string Author => "Towsey";

public override string SpeciesName => "ArdeaInsignis";

public override string CommonName => "White Heron";

public override Status Status => Status.Beta;

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

/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Birds/CisticolaExilis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ internal class CisticolaExilis : RecognizerBase

public override string SpeciesName => "CisticolaExilis";

public override string Description => "[ALPHA] Detects acoustic events for the golden-headed cisticola.";
public override string Description => "Detects acoustic events for the golden-headed cisticola.";

public override string CommonName => "Golden-headed cisticola";

public override Status Status => Status.InDevelopment;

public override AnalyzerConfig ParseConfig(FileInfo file)
{
Expand Down
4 changes: 4 additions & 0 deletions src/AnalysisPrograms/Recognizers/Birds/LewiniaPectoralis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public class LewiniaPectoralis : RecognizerBase

public override string SpeciesName => "LewiniaPectoralis";

public override string CommonName => "Lewin's Rail";

public override Status Status => Status.Beta;

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

//private const bool DoRecognizerTest = true;
Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Birds/NinoxBoobook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ internal class NinoxBoobook : RecognizerBase

public override string SpeciesName => "NinoxBoobook";

public override string Description => "[ALPHA] Detects acoustic events for the Australian Boobook owl.";
public override string Description => "Detects acoustic events for the Australian Boobook owl.";

public override string CommonName => "Boobook Owl";

public override Status Status => Status.Alpha;

public override AnalyzerConfig ParseConfig(FileInfo file)
{
Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisPrograms/Recognizers/Birds/NinoxConnivens.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class NinoxConnivens : RecognizerBase

public override string CommonName => "Barking owl";

public Status Status => Status.InDevelopment;
public override Status Status => Status.InDevelopment;

public override string Description => $"Acoustic event recognizer for the {this.CommonName}.";

Expand Down
4 changes: 3 additions & 1 deletion src/AnalysisPrograms/Recognizers/Birds/NinoxStrenua.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public class NinoxStrenua : RecognizerBase

public override string SpeciesName => "NinoxStrenua";

public override string Description => "[ALPHA] Detects acoustic events for the Australian Powerful Owl.";
public override string Description => "Detects acoustic events for the Australian Powerful Owl.";

public override string CommonName => "Powerful Owl";

public override Status Status => Status.Alpha;

public override AnalyzerConfig ParseConfig(FileInfo file)
{
RuntimeHelpers.RunClassConstructor(typeof(NinoxStrenuaConfig).TypeHandle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class TytoNovaehollandiae : RecognizerBase

public override string CommonName => "Masked owl";

public Status Status => Status.Alpha;
public override Status Status => Status.Alpha;

public override string Description => $"Acoustic event recognizer for the {this.CommonName}.";

Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisPrograms/Recognizers/Birds/TytoTenebricosa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class TytoTenebricosa : RecognizerBase

public override string CommonName => "Greater sooty owl";

public Status Status => Status.InDevelopment;
public override Status Status => Status.InDevelopment;

public override string Description => $"Acoustic event recognizer for the {this.CommonName}.";

Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Frogs/CriniaRemota.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ namespace AnalysisPrograms.Recognizers.Frogs
/// </summary>
internal class CriniaRemota : RecognizerBase
{
public override string Description => "[BETA/Experimental] Remote froglet. See class header for algorithm description.";
public override string Description => "Remote froglet. See class header for algorithm description.";

public override string Author => "Towsey";

public override string SpeciesName => "CriniaRemota";

public override string CommonName => "The Remote froglet";

public override Status Status => Status.Beta;

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

/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Frogs/LitoriaBicolor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ namespace AnalysisPrograms.Recognizers.Frogs

public class LitoriaBicolor : RecognizerBase
{
public override string Description => "[ALPHA/EMBRYONIC] Detects acoustic events of Litoria bicolor";
public override string Description => "Detects acoustic events of Litoria bicolor";

public override string Author => "Towsey";

public override string SpeciesName => "LitoriaBicolor";

public override string CommonName => "Northern dwarf tree frog";

public override Status Status => Status.InDevelopment;

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

/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Frogs/LitoriaCaerulea.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ namespace AnalysisPrograms.Recognizers.Frogs
/// </summary>
public class LitoriaCaerulea : RecognizerBase
{
public override string Description => "[ALPHA/EMBRYONIC] Detects acoustic events of Litoria caerulea";
public override string Description => "Detects acoustic events of Litoria caerulea";

public override string Author => "Towsey";

public override string SpeciesName => "LitoriaCaerulea";

public override string CommonName => "Common Green Tree Frog";

public override Status Status => Status.InDevelopment;

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

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions src/AnalysisPrograms/Recognizers/Frogs/LitoriaFallax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ internal class LitoriaFallax : RecognizerBase

public override string SpeciesName => "LitoriaFallax";

public override string CommonName => "Eastern dwarf tree frog";

public override Status Status => Status.InDevelopment;

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

/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Frogs/LitoriaFreycineti.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ namespace AnalysisPrograms.Recognizers.Frogs
/// </summary>
internal class LitoriaFreycineti : RecognizerBase
{
public override string Description => "[ALPHA/EMBRYONIC] Detects acoustic events of Litoria freycineti";
public override string Description => "Detects acoustic events of Litoria freycineti";

public override string Author => "Stark";

public override string SpeciesName => "LitoriaFreycineti";

public override string CommonName => "Freycinet's frog";

public override Status Status => Status.Unmaintained;

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

/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion src/AnalysisPrograms/Recognizers/Frogs/LitoriaNasuta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ namespace AnalysisPrograms.Recognizers.Frogs
/// </summary>
internal class LitoriaNasuta : RecognizerBase
{
public override string Description => "[ALPHA/EMBRYONIC] Detects acoustic events of Litoria nasuta";
public override string Description => "Detects acoustic events of Litoria nasuta";

public override string Author => "Towsey";

public override string SpeciesName => "LitoriaNasuta";

public override string CommonName => "The Striped Rocket Frog";

public override Status Status => Status.InDevelopment;

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

/// <summary>
Expand Down
Loading

0 comments on commit 5d277a6

Please sign in to comment.