Skip to main content

automated annotation of vocalizations for everybody

Project description

DOI PyPI version License

vak

automated annotation of vocalizations for everybody

Build Status

Usage

Training models to segment and label vocalizations

Currently the easiest way to work with vak is through the command line. You run it with config.ini files, using one of a handful of commands. Here's the help text that prints when you run $ vak -h (-h for help):

$ vak -h
usage: vak [-h] command configfile

vak command-line interface

positional arguments:
  command     Command to run, valid options are:
              ['prep', 'train', 'predict', 'finetune', 'learncurve']
              $ vak train ./configs/config_2018-12-17.ini
  configfile  name of config.ini file to use 
              $ vak train ./configs/config_2018-12-17.ini

optional arguments:
  -h, --help  show this help message and exit

As an example, you can run vak with a single config.ini file by using the train command and passing the name of the config.ini file as an argument:

(vak-env)$ vak prep ./configs/config_bird0.ini
(vak-env)$ vak train ./configs/config_bird0.ini

You can then use vak to apply the trained model to other data with the predict command.

(vak-env)$ vak predict ./configs/config_bird0.ini

For more details on how training works, see experiments.md, and for more details on the config.ini files, see README_config.md.

Data and folder structures

To train models, you must supply training data in the form of audio files or spectrograms, and annotations for each spectrogram.

Spectrograms and labels

The package can generate spectrograms from .wav files or .cbin files. It can also accept spectrograms in the form of Matlab .mat files. The locations of these files are specified in the config.ini file as explained in experiments.md and README_config.md.

Preparing training files

It 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.

Results of running the code

It is recommended to apply post processing when extracting the actual syllable tag and onset and offset timesfrom the estimates.

Predicting new labels

You can predict new labels by adding a [PREDICT] section to the config.ini file, and then running the command-line interface with the --predict flag, like so:
(vak-env)$ vak-cli --predict ./configs/config_bird0.ini An example of what a config.ini file with a [PREDICT] section is in the doc folder here.

Citation

If you use vak for a publication, please cite its DOI: DOI

License

License
BSD-3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vak-0.3.0a0.tar.gz (64.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vak-0.3.0a0-py3-none-any.whl (85.8 kB view details)

Uploaded Python 3

File details

Details for the file vak-0.3.0a0.tar.gz.

File metadata

  • Download URL: vak-0.3.0a0.tar.gz
  • Upload date:
  • Size: 64.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.10

File hashes

Hashes for vak-0.3.0a0.tar.gz
Algorithm Hash digest
SHA256 d222b88b86a9f0aab45105c8f88ae2a8e4bc3b060b3b376db0d595ecd1684791
MD5 68788af382d6c7afcf03656ca4b84a04
BLAKE2b-256 8b68ab080560c2fda803d6e653d090eb65c0e45742c3567ae88a30ee524bad35

See more details on using hashes here.

File details

Details for the file vak-0.3.0a0-py3-none-any.whl.

File metadata

  • Download URL: vak-0.3.0a0-py3-none-any.whl
  • Upload date:
  • Size: 85.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.10

File hashes

Hashes for vak-0.3.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 049f2293f5c818d93f4789393a0ca91e8f0198196b99616d1bdb507c5f1bd1be
MD5 e127ad45ae280e3b1efbcaf7fa60a55c
BLAKE2b-256 1194b3b8f13c1ef72165c4f3e8bfcdaec20171ab1f477d5c34ea1b5466cf23ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page