Skip to content

kalleknast/MarmosetCallClassification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MarmosetCallClassification

Classification of marmoset vocalizations

The model gets 96% correct on the test set.

Performance

Performance of the TweetyNet model trained on marmoset vocalizations*:

Accuracy Levenshtein Loss Segment Error Rate
0.9618 195.1 0.1217 0.3174

Installation

  1. Install vak version >= 0.8.
  2. Download the marmoset call classfication model and extract the ZIP archive.

Use

  1. Prepare directories and the configuration file. Either by creating the directories (relative to your working directory) in predict_example.toml (data/WAV, data/preprocessed and results/predictions), or by editing the configuration file predict.toml so that the paths point to the correct locations.
    [PREP]
    data_dir = "</path/to/the/WAV-files/to/run/the/model/on>"
    output_dir = "</path/to/where/the/organizing/CSV-file/should/be/stored>"
    spect_output_dir = "</path/to/where/the/spectrograms/should/be/stored>"
    [PREDICT]
    device = '<"cpu" or "cuda">'
    checkpoint_path = "</path/to/the/model/>TweetyNet/checkpoints/max-val-acc-checkpoint.pt"
    labelmap_path = "</path/to/the/model/>labelmap.json"
    spect_scaler_path = "</path/to/the/model/>StandardizeSpect"
    output_dir = "</dir/where/the/resulting/CSV-file/should/be/stored>"
    annot_csv_filename = "<name of the CSV-file with the predictions>.csv"
  1. Pre-process the WAV-files: vak prep predict.toml
  2. Predict: vak predict predict.toml. The resulting CSV file should be located and named according to annot_csv_filename above.
  3. (Optional) Plot the predictions for manual inspection:
    python3 plot.py <annot_csv_filename> <spec_dir> <fig_dir> --plot_dur 10 --mark_onsets --mark_offsets
    

About

Classification of marmoset vocalizations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages