Package: tweetynet
TweetyNetNow published in eLife:https://elifesciences.org/articles/63853Code to reproduce results from the article is in the directory./articleWhat istweetynet?A neural network architecture (shown below)
that automates annotation of birdsong and other vocalizations by segmenting spectrograms,
and then labeling those segments.This is an example of the kind of annotations thattweetynetlearns to predict:How is it used?InstallationShort version (for details see below):withpip$pipinstalltweetynetwithcondaon Mac and Linux$condainstalltweetynet-cconda-forgeon WindowsOn Windows, you need to add an additional channel,pytorch.You can do this by repeating the-coption more than once.$condainstalltweetynet-cconda-forge-cpytorch$#                                       ^ notice additional channel!Long version:To facilitate trainingtweetynetmodels and using trained models
to predict annotation on new datasets,
we developed thevaklibrary,
that is installed automatically withtweetynet.If you need more information about installation, please see thevakdocumentation:https://vak.readthedocs.io/en/latest/get_started/installation.htmlUsageTo train models and use them to predict annotationFor a tutorial on usingtweetynetwithvak, please see thevakdocumentation:https://vak.readthedocs.io/en/latest/get_started/autoannotate.htmlTo reproduce results from articleIn the directory./articlewe provide code to reproduce the results in the article"TweetyNet: A neural network that enables high-throughput, automated annotation of birdsong"https://elifesciences.org/articles/63853Please see theREADMEin that directory
for instructions on how to install and work with that code.FAQsTraining dataTo train models, you must supply training data in the form of audio files or
spectrogram files, and annotations.
The package can generate spectrograms from.wavor.cbinaudio files.
It can also accept spectrograms in the form of Matlab.matfiles or.npzfiles created bynumpy.vakuses a separate library to parse annotations,crowsetta,
which handles some common formats and can also be used to write custom parsers for other formats.
Please see thecrowsettadocumentation for more detail:https://crowsetta.readthedocs.io/en/latest/#Preparing training filesIt is possible to train on any manually annotated data but there are some useful guidelines:Use as many examples as possible- The results will just be better. Specifically, this code will not label correctly syllables it did not encounter while training and will most probably generalize to the nearest sample or ignore the syllable.Use noise examples- This will make the code very good in ignoring noise.Examples of syllables on noise are important- It is a good practice to start with clean recordings. The code will not perform miracles and is most likely to fail if the audio is too corrupt or masked by noise. Still, training with examples of syllables on the background of cage noises will be beneficial.For more details, please see thevak documentation.IssuesIf you run into problems, please use theissue trackeror contact the authors via email in the paper above.CitationIf you use or adapt this code, please cite its DOI:LicenseReleased underBSD license.Contributors ✨Thanks goes to these wonderful people (emoji key):yardencsGitHub💻🐛🔣📖🤔💬🔧⚠️✅📢David Nicholson💻🐛🔣📖🤔💬🔧⚠️✅📢Zhehao Cheng🐛This project follows theall-contributorsspecification. Contributions of any kind welcome!