kitzeslab / opensoundscape

Open source, scalable software for the analysis of bioacoustic recordings
http://opensoundscape.org
MIT License
135 stars 15 forks source link

Add a generate_embeddings() method to custom CNN #1056

Open Maxime-Bru opened 1 week ago

Maxime-Bru commented 1 week ago

I trained a custom CNN model following the tutorial (https://opensoundscape.org/en/latest/tutorials/train_cnn.html).

Now my model has a predict() method to get the prediction scores. I don't think it is yet possible to retrieve the embeddings: would it be possible to add a generate_embeddings() method to achieve this?

sammlapp commented 1 week ago

Hi @Maxime-Bru , this feature is implemented in the develop branch as CNN.embed() and will be included in the upcoming 0.11.0 release. To accomplish something similar in current/previous releases follow this example from the cookbook.

Maxime-Bru commented 1 week ago

Thank you, this works perfectly!