Mattk70 / Chirpity-Electron

AI powered audio analyser for bird call visualisation, detection and cataloguing
https://chirpity.mattkirkland.co,uk
24 stars 0 forks source link

Location filter when using BirdNET model #17

Closed DD4WH closed 5 months ago

DD4WH commented 5 months ago

@Mattk70 Thanks for this piece of software! Very easy to use and extremely fast!

I have been using various software packages to analyse my audio recordings to classify bird sounds, eg. BirdNET-Lite, BirdNET-Analyzer and the same models with BirdNET-Pi.

While using your app, I experienced the following issue:

Also, I have the following questions:

Chirpity is an amazing piece of software! Thank you very much for making it available! I will certainly be testing it out more in the next weeks on my NFC / NocMig recordings!

DD4WH commented 5 months ago

@Mattk70 I just recognized you are already working on a separate branch called v2.4, so I suspect that is the recently published BirdNET-Analyzer model with the location filter. Very good to know and looking forward to the development!

Mattk70 commented 5 months ago

Hi @DD4WH,

You are correct, I am working on integrating the 2.4 model of BirdNET - this will have the location filter added. The 0.10.1 release of Chirpity uses an old BirdNET model published in this one of Stefan Kahl's repos: https://github.com/kahst/BirdNET-Electron - it's 5 years old and the location filter is not available for it!

You can see the species list for the Chirpity model if (while using this model) you right-click any detection and select 'Edit Record'. The drop-down 'Species' list shows everything the classifier was trained on.

As for the threshold, the 2.4 version I am working on right now has a hardcoded value of 0.004. Yes, I will likely expose this in the UI later on, so you can set it. But this will require a bit of UI design to accommodate the setting

As you might have concluded, I plan to release a version with the new BirdNET model whilst its integration has some rough edges. At first, I expect you will be able to apply the BirdnET location filter to either model, however, this will be an on/off option. It will use the all-year likelihoods (equivalent to 'week = -1'). In a future release, I plan to add a "week" option for the filter. By default this will be inferred from the timestamp of the file being processed, but I guess an override option will be needed too. I just need to figure out how to present these options in the UI, so it doesn't get overly complex...

Mattk70 commented 5 months ago

@DD4WH

To your question about BirdNET parameters, sensitivity & overlap. They are both defaults: sigmoid = 1 and overlap = 0.

I have not seen a way to amend sensitivity with the BirdNET TFJS model. With overlap, Chirpity takes a slightly different approach. One of the problems with the approach of using analysis "windows" (both Chirpity and BirdNET models use a 3 second window for detection) is that partial calls at the edge of a window may produce false detections. In Chirpity's experimental 'context mode', the model combines the predictions in the current window with those of windows offset by 50% before and after the current window. If any of the species' predictions in the curent window do not reach the chosen threshold in at least one of the surrounding windows that prediction is discarded. As a technique, this has proven effective at reducing these false positives. However, there is an approximately 40% performance hit in doing this, and the number of false positives it squashes may not be worth the time it takes.

Vollpflock commented 5 months ago

Can’t wait for v2.4!

Is there a specific reason why you focus on keeping the UI simple, given that mostly advanced users will be using it?

Mattk70 commented 5 months ago

@Vollpflock - it's here.

As for the UI, yes, absolutely. In my experience, every new application has a learning curve. For many, that learning curve is steep and daunting. By keeping the UI simple, I hope to offer a faster way to get familiar with the basic use of the application. As you become more familar with it you will discover the more advanced features which can be accessed through context menus and keyboard shortcuts,

I'd also like Chirpity to be accessible to an audience of keen birders, many of whom will not be early adopters or familiar with Audio software. A good number of birders I know don't feel confident to identify many birds by their calls or song, and consequently would never entertain the idea of Nocmig. With a tool like Chirpity, it's my hope that they will be tempted to give it a try.