This repo contains the scripts necessary to train, tune, apply and score VTC2.0.
- to be added - probably envt already exists...
First, install this experimental repository & cd into it:
git clone https://github.com/marianne-m/pyannote-vtc-testing.git
cd pyannote-vtc-testing
Install pyannote.audio==2.0
pip install -r requirements.txt
Make sure you have a database.yml
file in ~/.pyannote
.
The main.py
script does all you need.
Run python main.py -h
to get help or look at the launchers script to get an
idea of the arguments for each command.
You have some launchers for Jean Zay and Oberon in the launchers
folder
With the main.py
script, you can :
- train a model on a given dataset's train-set
- tune the pipeline's hyperparameters on the dataset's dev-set
- apply the tuned pipeline on a dataset's test-set
- score the test-set's inference files with either IER or average Fscore
To train the model :
python main.py runs/experiment/ train \
-p X.SpeakerDiarization.BBT2 \
--classes babytrain \
--model_type pyannet \
--epoch 100
After training, you need to tune the parameters :
python main.py runs/experiment/ tune \
-p X.SpeakerDiarization.BBT2 \
--model_path runs/experiment/checkpoints/best.ckpt \
--classes babytrain \
--metric fscore
You can then apply the model with the best parameters found at the tuning step :
python main.py runs/experiment/ apply \
-p X.SpeakerDiarization.BBT2 \
--model_path runs/experiment/checkpoints/best.ckpt \
--classes babytrain \
--apply_folder runs/experiment/apply/ \
--params runs/experiment/best_params.yml
Finally you can score a model :
python main.py runs/experiment/ score \
-p X.SpeakerDiarization.BBT2 \
--model_path runs/experiment/checkpoints/best.ckpt \
--classes babytrain \
--metric fscore \
--apply_folder runs/experiment/apply/ \
--report_path runs/experiment/results/fscore.csv
You can find a pre-trained model here : model_vtc2/checkpoints/best.ckpt
This model was trained with Pyannote 2.0, with a F-score of 61.27.