-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add tutorial for multilabel training #254
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @PariaValizadeh,
Thanks for your work. To get the most out it for our readers, I would suggest the following changes:
- Load the data with our
BirdSetDataModule
without any preprocessing so that it outputs batched waveforms - Pick the first sample of the batch from the train and test set (this will show the difference of focal / soundscapes)
- Make the sounds audible
- Now, add preprocessing to train a EfficientNet (EfficientNet because we can upload a pretrained model for that, and we included the EfficientNet in BirdSet), make sure to use the same preprocessing config as done in
configs/experiment/birdset_neurips24/HSN/DT/efficientnet.yaml
- Visualize the first sample (now a spectrogram)
- Train the model (with same configs) and add the option to download the pretrained model
- Run test with
trainer.test()
- Run model on previously selected test sample
- Print the predicted classes and the target class.
"source": [ | ||
"## load the test dataset\n", | ||
"from datasets import load_dataset\n", | ||
"hsn_test = load_dataset(\"DBD-research-group/BirdSet\",\"HSN\", split=\"test\")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PariaValizadeh This will not use the cached version and therefore requires a complete redownload.
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Step 6: Visualization" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PariaValizadeh Could you move the visualization before the model training? So that the reader sees how the data gets preprocessed by the birdset pipeline?
This PR adds a tutorial notebook to guide practictioners how to train a ResNet model for multilabel classification on the HSN dataset.