-
Notifications
You must be signed in to change notification settings - Fork 8
Humpback whale algorithm from Google #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The |
Hi @Molkree, Can I clarify if this issue is just to test the model on the audio file first, or to integrate it into the GH Actions workflow? Thanks. |
@Benjamintdk, @wetdog already has the functionality to apply the model to the audio files, but it would be great to integrate in a pipeline as new data comes in, and storing summary statistics of the output. |
@Benjamintdk, as Valentina mentioned above you can start with just applying an existing function from that notebook and see how it looks for the time with confirmed humpback whale call. But the ultimate goal is to run it continuously, yes. I think that running it every day for the previous 24 hours would be overkill and we probably will need to find "interesting" time segments to run the neural net on them. But it's a different issue 😄 Making the model work on recordings from Orcasound is the first step, probably semi-manually supplying audios at first but later with the small script that takes start+end time and the node. |
@valentina-s @Molkree Thanks so much for clarifying, I will attempt testing the model first in the notebook before looking to integrate it with the script. I still have a last question though: Will the model be used to process OrcaSound data or OOI data (cos you mentioned OOI in the original post)? |
Hi @Molkree I was wondering how you are able to ascertain the specific Unix time stamp when accessing the AWS CLI data from the stream? I realized that I have to manually convert the UNIX timestamp to UTC via an online converter before converting to PDT every time. Is that the right way or is there an easier way that I'm missing out on? |
Hi @valentina-s I have combined the functionalities as described and am able to generate the embeddings from the .wav files as well as use the model to predict correct probability scores on both positive and negative samples. Can I also clarify what sort of output summary statistics will be helpful/meaningful? I wanted to clarify if the summary statistics you are referring to are the images and PCA results (explained variance) that the notebook generates, or something else such as the potential 'times' at which a humpback call is possibly detected? Thanks. |
Great @Benjamintdk! Maybe as a starter you can use the scores because it is easier to visualize. We can think about a compact representation of the embeddings later. |
Here is also a time when humpbacks were heard on orcasound_lab: "2020-01-08 2:06:00" (UTC time). It would be interesting what the algorithm finds during this period. Scott and Emily have most probably many more more recent examples. |
Regarding the action workflow: updating a readme with a new plot would be a nice outcome. |
@valentina-s thanks for the reply! I've evaluated the model as you suggested on the timing you provided and also another example (2020-11-04 04:15:00 UTC) according to this spreadsheet, both of which the model detects successfully. Regarding the new plots to be included in the action workflow, will the plots attached below suffice? They show the scores plotted against time, and regions of interest are above the 0.5 threshold. I'm thinking that the workflow can generate a new plot for the day every time it is run, and update the Readme as you have suggested. |
For some context, with regards to the weird and random spikes, the model predicts 3 scores for each wav file (because each file is 10 seconds long, and the model generates predictions for windows of 3.92 seconds), and I took the max score to represent each wav file to simplify the plots. I wasn't sure if averaging might work better, but I felt that it runs the risk of missing out important detections which are only apparent in specific parts of the wav file. Some things I feel I could potentially explore further for improvement:
I can make a PR for the changes if this is tentatively ok. |
@Benjamintdk, hmmm I actually don't remember why I've mentioned OOI specifically, maybe because whoever suggested this said humpback whales might be around OOI nodes more often than Orcasound nodes? But anyway this should work for our recordings too so maybe run on both? We'll see how it goes, it seems like you made it work for Orcasound already. |
@Benjamintdk, urgh, sorry for the long reply to this. Yes, there is a way, try using this package. You can see the usage here. The package needs some polish but should work I think. We will also need to integrate it with Orcasound workflows in this repo. |
How would the plot for the whole day look? Do you mean you would want to auto-update readme every day? I would be against this, this sounds like a good case for GitHub Pages or something like that but not committing directly to the repository.
Plots need a legend. |
Hi @Benjamintdk Great work on testing the Humpbacks model output. I'm going to be more active from this month if you have doubts about audio or the models. -I just want to remember that the audio that is fed to the model needs to be at a 10Khz sample rate, in order to obtain valid scores from the model. -The threshold value needs to be calibrated as they suggest on the hub page "For example, in our eval set, where about 10% of the examples were positives, precision was already 90% at a "probability" threshold of 0.1". That step can be made with the exploration steps that you suggested. Finally, is common to use in sound event detection a Median filter to smooth the predictions of a classifier |
Thanks for sharing the tool, it will be really helpful!
Agreed with the comment about not committing to the repository directly. The Github Pages idea sounds good actually, but would probably require it to be set up in a separate PR first? Or perhaps the image could be saved in a folder in a separate branch first? |
@Benjamintdk Plot looks good, and it is great that the events get detected! It is interesting though that the model output is spiky in general. Maybe certain frequencies get triggered more, but maybe just the noise is variable. Listening through some examples may indeed shed some light. Another experiment could be to apply to snippets where there are Orca calls. There are actually certain Orca calls which are similar to certain Humpback calls, but also certain Humpback sounds are very distinctive and long and I am sure @scottveirs will not confuse them. Regarding, the strategy to combine, |
@Molkree I believe @scottveirs might have mentioned that we know of certain times where in the OOI stream there are Humpbacks and some of our collaborators at UW have that information, but I do not have the exact datetimes with me. We can do OOI later. |
@swearic Do you have date-times for any favorite humpback events on one of the Oregon shelf/slope OOI hydrophones? For the Orcasound Lab events you can search for humpbacks in the Orcasound event log for now, and/or talk with Emily in Slack about annotated files she's completed thus far... |
Hi @wetdog, thanks for the advice and nice to meet you!
Sorry for making this post extra long, just had a lot of thoughts regarding this. Do let me know if it's getting too long and if it should be shifted to slack instead perhaps. |
@valentina-s, noted on the longer songs, I do notice from the paper as well that they used 75 second clips in their test set, which I'm thinking could be done and perhaps improve the scores. Also noted on the possible confusion if resident killer whale calls, which I intend to clarify with Emily. Thanks for the guidance as well @scottveirs |
Yeah, I guess? So do you suggest adding the image to the separate branch and deploying GH Pages from that branch? This Action you linked is a bit funny, I'm not sure how it's better than just using
Oh, I didn't realize, thanks for the clarification.
Slightly over an hour is actually good enough for 24 hours of data. But you utilize GPU most likely (right?) which we won't have in GH Actions VM so that's my concern. We won't know until we try though 😅 |
I prefer long posts and discussions on GitHub please! 😁 |
|
@Benjamintdk I have added an empty |
On OOI data
https://tfhub.dev/google/humpback_whale/1
The text was updated successfully, but these errors were encountered: