You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DOC: Add vignette with segmenting algorithm from Ghaffari Devos 2023 + IR metrics #56
In the attached paper from FA2023, @houtan-ghaffari and Devos use a segmentation algorithm with the following steps. Would be nice to add that algorithm to facilitate reproducibility
Thank you very much for your work and for sharing the datasets that we used in our work. The purpose of that thresholding algorithm was only to showcase how much expertise is required to design a thresholding segmentation algorithm, which in the end, still has flaws, as you also showed in the TweetyNet paper before us. However, I will soon put a complete jupyter notebook on my GitHub for research and educational purposes. It's not an easy-to-use software for everyone, just a functional code, but it should be a breeze for you to adapt it :). I'll post the link here after I made the repo.
The purpose of that thresholding algorithm was only to showcase how much expertise is required to design a thresholding segmentation algorithm, which in the end, still has flaws, as you also showed in the TweetyNet paper before us.
I also have to admit as an imposter in signal processing I wasn't aware of using the Hilbert transform to get the envelope. So I'm kind of thinking out loud about how we could provide functionality to "build" a segmenter that specifies each of the steps (get envelope, smooth, threshold, clean up). Something like a scikit-learn pipeline or set of PyTorch transforms, but just for segmentation.
Thank you very much!
I'm new to Bioacoustics and lack the expertise in many required areas. However, I experienced that using spectral power is the best automated way to segment the syllables when using thresholding algorithms. Taking the spectrogram, taking the mean (or max) along the frequency axis to get an envelope, and setting the threshold as the mean value of the whole envelope. Of course, I'm talking only about professionally recorded songs like the ones you published, without severe noise and environmental interference.
We are working on large-scale and fully automated annotation methods to alleviate the annotation difficulties, but we are not there to publish anything. I hope to be able to share better methods with the community shortly, and they might be of interest to your software. Thank you again for your datasets and work!
Hi David and Houtan! Congratulations on the paper, Houtan! It seems like a really interesting segmentation approach. I don't have much to add to this convo except to say that AVN includes a metrics class in the segmentation module which can be used to get the precision, recall and F1 score for segmentation. I'm not sure that it's the most efficient code, but it does the job and might be a helpful reference as you add segmentation metrics to vocalpy, David. Let me know if you have any questions about it or if there is anything I can do to help out!
changed the title [-]ENH: Add segmenting algorithm from Ghaffari Devos 2023[/-][+]DOC: Add vignette with segmenting algorithm from Ghaffari Devos 2023 + IR metrics[/+]on Sep 28, 2023
Thank you very much!
I'm new to Bioacoustics and lack the expertise in many required areas. However, I experienced that using spectral power is the best automated way to segment the syllables when using thresholding algorithms. Taking the spectrogram, taking the mean (or max) along the frequency axis to get an envelope, and setting the threshold as the mean value of the whole envelope. Of course, I'm talking only about professionally recorded songs like the ones you published, without severe noise and environmental interference.
We are working on large-scale and fully automated annotation methods to alleviate the annotation difficulties, but we are not there to publish anything. I hope to be able to share better methods with the community shortly, and they might be of interest to your software. Thank you again for your datasets and work!
I have changed this issue to be a documentation issue--we need to add an example to our docs of using IR metrics like precision and recall that I just added in #57. I will be sure to reference your paper because I think your approach of dynamically choosing the mean as a threshold is fairly common, although AFAIK this hasn't been documented in the lit anywhere.
I don't have much to add to this convo except to say that AVN includes a metrics class in the segmentation module which can be used to get the precision, recall and F1 score for segmentation. I'm not sure that it's the most efficient code, but it does the job and might be a helpful reference as you add segmentation metrics to vocalpy, David. Let me know if you have any questions about it or if there is anything I can do to help out!
Thank you @theresekoch -- Mostly I just want people to know about your work.
I did add these metrics in #57, you can see all the gory details of the different implementations I tried in all the commits in that branch 😭 (if for some reason you want to)
Basically after I tried to roll my own vectorized version, I started with what's in mir_eval, which seems like it would be fairly efficient but doesn't choose hits based on how close the estimated boundary is to the reference. So I used a more expensive approach that lets us do that.
Would love to hear feedback in whatever way is convenient for you.
Activity
houtan-ghaffari commentedon Sep 22, 2023
Hello,
Thank you very much for your work and for sharing the datasets that we used in our work. The purpose of that thresholding algorithm was only to showcase how much expertise is required to design a thresholding segmentation algorithm, which in the end, still has flaws, as you also showed in the TweetyNet paper before us. However, I will soon put a complete jupyter notebook on my GitHub for research and educational purposes. It's not an easy-to-use software for everyone, just a functional code, but it should be a breeze for you to adapt it :). I'll post the link here after I made the repo.
Kind regards,
Houtan
houtan-ghaffari commentedon Sep 22, 2023
Here's the repo:
https://github.com/houtan-ghaffari/bird_syllable_segmentation
NickleDave commentedon Sep 23, 2023
🙌 thank you @houtan-ghaffari for sharing this
Very understood.
I think you're exactly right, that it's helpful to have a "baseline" thresholding algorithm.
See also different algorithms here from @theresekoch in https://github.com/theresekoch/avn and discussion in #5
I also have to admit as an imposter in signal processing I wasn't aware of using the Hilbert transform to get the envelope. So I'm kind of thinking out loud about how we could provide functionality to "build" a segmenter that specifies each of the steps (get envelope, smooth, threshold, clean up). Something like a scikit-learn pipeline or set of PyTorch transforms, but just for segmentation.
I'm in the middle of adding an implementation of information retrieval metrics (precision, recall, F1) here:
https://github.com/vocalpy/vocalpy/tree/add-segment-metrics-fix-%2354
We'll want a vignette that shows how to use those metrics, I can include your simple baseline and refs/links to the paper + repo in that
houtan-ghaffari commentedon Sep 25, 2023
Thank you very much!
I'm new to Bioacoustics and lack the expertise in many required areas. However, I experienced that using spectral power is the best automated way to segment the syllables when using thresholding algorithms. Taking the spectrogram, taking the mean (or max) along the frequency axis to get an envelope, and setting the threshold as the mean value of the whole envelope. Of course, I'm talking only about professionally recorded songs like the ones you published, without severe noise and environmental interference.
We are working on large-scale and fully automated annotation methods to alleviate the annotation difficulties, but we are not there to publish anything. I hope to be able to share better methods with the community shortly, and they might be of interest to your software. Thank you again for your datasets and work!
theresekoch commentedon Sep 25, 2023
Hi David and Houtan! Congratulations on the paper, Houtan! It seems like a really interesting segmentation approach. I don't have much to add to this convo except to say that AVN includes a metrics class in the segmentation module which can be used to get the precision, recall and F1 score for segmentation. I'm not sure that it's the most efficient code, but it does the job and might be a helpful reference as you add segmentation metrics to vocalpy, David. Let me know if you have any questions about it or if there is anything I can do to help out!
[-]ENH: Add segmenting algorithm from Ghaffari Devos 2023[/-][+]DOC: Add vignette with segmenting algorithm from Ghaffari Devos 2023 + IR metrics[/+]NickleDave commentedon Sep 28, 2023
Thank you @houtan-ghaffari, that's helpful to know.
Please feel free to also share your FA2023 paper and any future work in our forum here:
https://forum.vocalpy.org/
I have changed this issue to be a documentation issue--we need to add an example to our docs of using IR metrics like precision and recall that I just added in #57. I will be sure to reference your paper because I think your approach of dynamically choosing the mean as a threshold is fairly common, although AFAIK this hasn't been documented in the lit anywhere.
NickleDave commentedon Sep 28, 2023
Thank you @theresekoch -- Mostly I just want people to know about your work.
I did add these metrics in #57, you can see all the gory details of the different implementations I tried in all the commits in that branch 😭 (if for some reason you want to)
Basically after I tried to roll my own vectorized version, I started with what's in mir_eval, which seems like it would be fairly efficient but doesn't choose hits based on how close the estimated boundary is to the reference. So I used a more expensive approach that lets us do that.
Would love to hear feedback in whatever way is convenient for you.
NickleDave commentedon May 23, 2024
Added this vignette in #133