Skip to content
Snippets Groups Projects
Commit 9c4e6ee4 authored by Paul Best's avatar Paul Best
Browse files

Merge commit '5e58474c'

parents 685d5184 5e58474c
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ infos on current collaborations in
https://docs.google.com/document/d/179dD1d6lmWhQ9e2E1AUoJyLZ1d_5c-aMNwAPkbmIcBU
### metadata.py
Stores a dictionary of datasets and characteristics (SR, NFFT, and path to access soundfiles)
Stores a dictionary of datasets and characteristics (SR, NFFT, path to access soundfiles, and downsampling factor for ultra/infra-sonic signals)
Convenient to iterate over the whole dataset
```
from metadata import species
......@@ -26,33 +26,40 @@ Runs all baseline algorithms over the dataset.
- [x] pyin (librosa implem)
- [x] crepe (torchcrepe implem)
- [x] crepe finetuned (torchcrepe implem)
- [ ] crepe finetuned over all species BUT the one it is evaluated on
- [x] crepe finetuned over all species except the target
- [x] crepe finetuned only on the target species
- [x] crepe (original tensorflow implem https://arxiv.org/abs/1802.06182)
- [x] basic pitch (https://arxiv.org/abs/2203.09893)
- [x] pesto (https://arxiv.org/abs/2309.02265)
- [~] pesto finetuned over the target species
This scripts stores predictions along with resampled annotations in `{basename}_preds.csv` files
### print_annot.py
For each vocalisation, prints a spectrogram and overlaid annotations and predictions as .png file stored in the `pred_pngs` folder.
### eval_all.py
Evaluates each algorithms over the dataset using `{basename}_preds.csv` files, with a threshold of 50 cents for accuracies.
For each algorithms and species, this outputs ROC optimal thresholds, Recall, False alarm, Pitch accuracy, and Chroma accuracy.
/!\ These metrics are mesured per vocalisation before being averaged.
Scores are stored in `scores/{specie}_scores.csv` files
### get_noisy_labels.py
Detects potential misannotations.
It measures
- the SNR as the median of the annotated f0's energy relative to the median energy for its time bin.
- the presence of a sub-harmonic as the SNR (see above) of half the annotated f0
- the presence of a 2/3 sub-harmonic as the SNR (see above) of 2/3 the annotated f0
These values are then thresholded and "noisy" vocalisation spectrograms are copied into the `noisy_pngs` folder to browse and check results. One can then check if the spectrogram exists in `noisy_pngs` to discard noisy labels.
### compute_salience_SHR.py
Evaluates metrics for each annotated temporal bin:
- the presence of a sub-harmonic following [this paper](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=cb8f47c23c74932152456a6f7a464fd3a2321259)
- the saliency of the annotation as the ratio of the energy of the f0 (one tone around the annotation) and its surrounding (one octave around the annotation)
These values are stored in the SHR and salience columns of the {basename}_preds.csv files
### get_noisy_pngs.py
Thresholds saliency and SHR values vocalisation wise and copies those considered "noisy" into the `noisy_pngs` folder to browse and check results. One can then check if the spectrogram exists in `noisy_pngs` to discard noisy labels.
### train_crepe.py
Fine tunes the crepe model using the whole dataset.
- [x] Loads 1024 sample windows and their corresponding f0 to be stored in a large `train_set.pkl` file (skip if data hasn't changed).
- [x] Applies gradient descent using the BCE following the crepe paper (this task is treated as a binary classification for each spectral bin).
- [x] The fine tuned model is stored in `model_all.pth`
- [ ] Train on all species but one given as argument
- [x] The fine tuned model is stored in `crepe_ft/model_all.pth`
- [x] Train on one target species given as argument (weights are stored in `crepe_ft/model_only_{specie}.pth)
- [x] Train on all species except the target given as argument (weights are stored in `crepe_ft/model_omit_{specie}.pth)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment