Skip to content
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

Add F1 score, precision, and recall metrics as MultilabelSegmentation default metrics #1336

Open
wants to merge 40 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e4680c2
add f1,precision,recall metrics for multilabel task
FrenchKrab Apr 19, 2023
d771729
black formatting
FrenchKrab Apr 20, 2023
458bebe
simplify MultilabelSegmentation's default_metric logic
FrenchKrab Apr 20, 2023
cd47969
better shape for tensors passed to MultilabelSegmentation metrics
FrenchKrab Apr 20, 2023
2d97b0b
use macro avg for default MultilabelSegmentation metrics
FrenchKrab Apr 20, 2023
53e676d
black format
FrenchKrab Apr 20, 2023
999252e
add support for "per class" metric for MultilabelSegmentation
FrenchKrab Apr 20, 2023
e698bb3
fix logic in multilabel setup_validation_metric
FrenchKrab Apr 21, 2023
b7cf6f5
rename "_per_metric" -> "_classwise"
FrenchKrab Apr 21, 2023
a890ef6
add Loggable and LoggableHistogram classes
FrenchKrab Apr 21, 2023
7ac8209
Revert "add Loggable and LoggableHistogram classes" (oops, wrong branch)
FrenchKrab Apr 24, 2023
68a4d47
fix wrong default_metric return value
FrenchKrab Apr 25, 2023
7e06f4b
make MultilabelSegmentation global metric actually be multilabel
FrenchKrab May 2, 2023
e008ad6
update comments
FrenchKrab May 2, 2023
1c1674b
Merge branch 'develop' into multilabel_default_metrics
FrenchKrab May 2, 2023
9b43f41
small fix
FrenchKrab May 2, 2023
3f0bf90
Merge branch 'multilabel_default_metrics' of github.com:FrenchKrab/py…
FrenchKrab May 2, 2023
05638c7
Merge branch 'develop' into multilabel_default_metrics
hbredin May 10, 2023
5f51b50
add ignore_index to default_metric_classwise
FrenchKrab May 11, 2023
3107105
Revert "add ignore_index to default_metric_classwise"
FrenchKrab May 11, 2023
0551070
fix: raise TypeError on wrong device type in Pipeline.to and Inferenc…
chai3 Jun 8, 2023
30ddb0b
feat(task): add support for multi-task models (#1374)
hbredin Jun 12, 2023
4eb7190
fix(inference): fix multi-task inference
hbredin Jun 12, 2023
dcdfc15
feat: update FAQtory default answer
hbredin Jun 15, 2023
3363be6
improve(test): use pyannote.database.registry (#1413)
hbredin Jun 22, 2023
017c910
feat(pipeline): add `return_embeddings` option to `SpeakerDiarization…
flyingleafe Jun 23, 2023
cf0e3b3
fix: fix missed speech at the very beginning/end
hbredin Jun 27, 2023
f393546
doc: add note to self regarding cluster reassignment (#1419)
hbredin Jun 28, 2023
35be745
fix(doc): fix typo in diarization docstring
DiaaAj Jul 9, 2023
bc0920f
ci: update suggest.md (#1435)
hbredin Jul 16, 2023
7194929
feat: add support for WeSpeaker embeddings (#1444)
hbredin Aug 2, 2023
37b39b0
fix: fix security issue in FAQtory bot
aashish-19 Aug 7, 2023
5a7df38
Update README.md
hbredin Aug 30, 2023
2af703d
Update README.md
hbredin Aug 30, 2023
b660b1e
fix(task): fix MultiLabelSegmentation.val_monitor
FrenchKrab Sep 15, 2023
11e8e6c
Merge branch 'develop' into multilabel_default_metrics
hbredin Sep 15, 2023
9df6944
fix(core): fix Model.example_output for embedding models
hbredin Sep 16, 2023
4be15a4
update multilabel classwise metrics naming
FrenchKrab Sep 18, 2023
9b9c966
update multilabel default metric + docstring + black formatting
FrenchKrab Sep 18, 2023
10a51f9
Merge branch 'develop' into multilabel_default_metrics
hbredin Sep 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 20 additions & 6 deletions .faq/suggest.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Thank you for your issue.

{%- if questions -%}
{% if questions|length == 1 %}
We found the following entry in the [FAQ]({{ faq_url }}) which you may find helpful:
Expand All @@ -9,12 +11,24 @@ We found the following entries in the [FAQ]({{ faq_url }}) which you may find he
- [{{ question.title }}]({{ faq_url }}#{{ question.slug }})
{%- endfor %}

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

{%- else -%}
Thank you for your issue. Give us a little time to review it.

PS. You might want to check the [FAQ]({{ faq_url }}) if you haven't done so already.
You might want to check the [FAQ]({{ faq_url }}) if you haven't done so already.
{%- endif %}

This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory)
Feel free to close this issue if you found an answer in the FAQ.

If your issue is a feature request, please read [this](https://xyproblem.info/) first and update your request accordingly, if needed.

If your issue is a bug report, please provide a [minimum reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) as a link to a self-contained [Google Colab](https://colab.research.google.com/) notebook containing everthing needed to reproduce the bug:
- installation
- data preparation
- model download
- etc.

Providing an MRE will increase your chance of getting an answer from the community (either maintainers or other power users).

Companies relying on `pyannote.audio` in production may contact [me](https://herve.niderb.fr) via email regarding:
* paid scientific consulting around speaker diarization and speech processing in general;
* custom models and tailored features (via the local tech transfer office).

> This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory)
4 changes: 3 additions & 1 deletion .github/workflows/new_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
- name: Install FAQtory
run: pip install FAQtory
- name: Run Suggest
run: faqtory suggest "${{ github.event.issue.title }}" > suggest.md
env:
TITLE: ${{ github.event.issue.title }}
run: faqtory suggest "$TITLE" > suggest.md
- name: Read suggest.md
id: suggest
uses: juliangruber/read-file-action@v1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ jobs:
pip install -e .[dev,testing]
- name: Test with pytest
run: |
export PYANNOTE_DATABASE_CONFIG=$GITHUB_WORKSPACE/tests/data/database.yml
pytest
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
### Breaking changes

- BREAKING(task): rename `Segmentation` task to `SpeakerDiarization`
- BREAKING(task): remove support for variable chunk duration
- BREAKING(task): remove support for variable chunk duration for segmentation tasks
- BREAKING(pipeline): pipeline defaults to CPU (use `pipeline.to(device)`)
- BREAKING(pipeline): remove `SpeakerSegmentation` pipeline (use `SpeakerDiarization` pipeline)
- BREAKING(pipeline): remove support `FINCHClustering` and `HiddenMarkovModelClustering`
- BREAKING(pipeline): remove support for `FINCHClustering` and `HiddenMarkovModelClustering`
- BREAKING(pipeline): remove `segmentation_duration` parameter from `SpeakerDiarization` pipeline (defaults to `duration` of segmentation model)
- BREAKING(setup): drop support for Python 3.7
- BREAKING(io): channels are now 0-indexed (used to be 1-indexed)
Expand All @@ -26,12 +26,17 @@
* replace `Audio()` by `Audio(mono="downmix")`;
* replace `Audio(mono=True)` by `Audio(mono="downmix")`;
* replace `Audio(mono=False)` by `Audio()`.
- BREAKING(model): get rid of (flaky) `Model.introspection`
If, for some weird reason, you wrote some custom code based on that,
you should instead rely on `Model.example_output`.

### Features and improvements

- feat(task): add support for multi-task models
- feat(pipeline): send pipeline to device with `pipeline.to(device)`
- feat(pipeline): make `segmentation_batch_size` and `embedding_batch_size` mutable in `SpeakerDiarization` pipeline (they now default to `1`)
- feat(task): add [powerset](https://arxiv.org/PLACEHOLDER) support to `SpeakerDiarization` task
- feat(pipeline): add `return_embeddings` option to `SpeakerDiarization` pipeline
- feat(pipeline): add progress hook to pipelines
- feat(pipeline): check version compatibility at load time
- feat(task): add support for label scope in speaker diarization task
Expand All @@ -44,6 +49,7 @@
- fix(pipeline): fix reproducibility issue with Ampere CUDA devices
- fix(pipeline): fix support for IOBase audio
- fix(pipeline): fix corner case with no speaker
- fix(train): prevent metadata preparation to happen twice
- improve(task): shorten and improve structure of Tensorboard tags

### Dependencies
Expand Down Expand Up @@ -82,7 +88,7 @@

- last release before complete rewriting

## Version 1.0.1 (2018--07-19)
## Version 1.0.1 (2018-07-19)

- fix: fix regression in Precomputed.__call__ (#110, #105)

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Neural speaker diarization with `pyannote.audio`
> [!IMPORTANT]
> I propose (paid) scientific [consulting services](https://herve.niderb.fr/consulting.html) to companies willing to make the most of their data and open-source speech processing toolkits (and `pyannote` in particular).

# Speaker diarization with `pyannote.audio`

`pyannote.audio` is an open-source toolkit written in Python for speaker diarization. Based on [PyTorch](pytorch.org) machine learning framework, it provides a set of trainable end-to-end neural building blocks that can be combined and jointly optimized to build speaker diarization pipelines.

Expand Down Expand Up @@ -126,9 +129,8 @@ pip install -e .[dev,testing]
pre-commit install
```

Tests rely on a set of debugging files available in [`test/data`](test/data) directory.
Set `PYANNOTE_DATABASE_CONFIG` environment variable to `test/data/database.yml` before running tests:
## Test

```bash
PYANNOTE_DATABASE_CONFIG=tests/data/database.yml pytest
pytest
```