New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Multilabel Detection #891
Conversation
# Conflicts: # pyannote/audio/pipelines/multilabel_detection.py
…sors # Conflicts: # pyannote/audio/cli/train_config/hydra/train.yaml
Codecov Report
@@ Coverage Diff @@
## develop #891 +/- ##
===========================================
- Coverage 35.32% 34.23% -1.10%
===========================================
Files 58 59 +1
Lines 3459 3584 +125
===========================================
+ Hits 1222 1227 +5
- Misses 2237 2357 +120
Continue to review full report at Codecov.
|
Alright, I've tested it again using the clinical data, the scores are analogous to what I got in the table in #694 . Marianne is going to test it on babytrain data, but she's currently on holiday (and for two weeks). If that's ok with you, i'd like to proceed to the part where you make sure that the code is mergeable, as I think that this should be good enough for a merge. |
Seems to go in the right direction. In the meantime, could you add a notebook showing how to use this new objects to train a male/female/speech multi-label pipeline on top of Basically, this would illustrate
|
* rename MultilabelDetectionPipeline to MultilabelDetection * rename MultilabelFMeasure to MacroAverageFMeasure and move it to pyannote.audio.utils.metric * rename VoiceTypeClassifierPreprocessor to DeriveMetaLabels and move it to pyannote.audio.utils.preprocessors * make segmentation model mandatory and remove default parameters * add support for pipeline hook * rename chunk_labels to ordered_labels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent some time looking at the code. Looks good!
I do have a few questions and would love an update on the notebook :) Does it run as it is right now (refering to the link you shared earlier)?
for label in self._classes | ||
} | ||
) | ||
# TODO: would it make sense to share min_duration_{on|off} between classes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this particular task that may lead to a huge hyperparameter search space, we could also force onset == offset
(once again through a flag use_hysteresis
).
for label in self._classes | ||
} | ||
) | ||
# TODO: would it make sense to share min_duration_{on|off} between classes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, let's do that in a separate PR.
num_workers: int = None, | ||
pin_memory: bool = False, | ||
augmentation: BaseWaveformTransform = None, | ||
metric: Union[Metric, Sequence[Metric], Dict[str, Metric]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't thought a lot about the validation metric for this type of task.
It relies on AUROC right? But what does it mean for multilabel classification?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does rely on AUROC I think. I don't have an answer to this. I just used the metric provided by the class without thinking a second about what I was doing. 🙃
FYI - I just released pyannote.pipeline 2.3 with support for |
All right https://colab.research.google.com/drive/1JX3x4t_QTHMr8hzjw3Em8eQBQnQ3UBgk#scrollTo=U9lwdYcTHyp_ is working fine as an example (with your input on using a subset of AMI). The inferred annotations look pretty good, and the tuning step amounts to a noticeable gain of bout 5% of IER. If you think this is good enough, I can then re-add the comments and tutorial text from the original notebook (with a couple of tweaks) and we can call it a day. I'll also merge the latest commits from "upstream". |
I'll also take care of the comments you submitted in #891 (review) |
Awesome! I was able to run the whole thing successfully in 10min or so.
Yes, please! |
I re-added the text to the colab notebook, and added, implemented and tested the |
Hey @hadware, would you mind adding the notebook to this PR? This should go in the |
…ials/ folder. added entry in README.md.
Done. |
Is there anything more needed to merge this? |
Hurrah! Looking forward to lots of new applications! I removed the notebook because it felt like it was not clean enough. Thanks again @hadware for the hard work and sorry for being such a pinailleur... |
The pinailling is part of the fun 🥵 I'd like to pretrain a couple of models to host then on hugginface along with the others. What kind of classes/train datasets would you suggest? I was thinking about |
This is a new PR for the VTC feature, this time based on a cleaner implem. I'm making a new PR as to keep the former branch "clean" (and prevent any mishaps).
What is done:
SpeakerTracking
task into aMultilabelDetection
taskMultilabelPipeline
MultilabelFscore.report()
What's to be done: