All Projects → desh2608 → dover-lap

desh2608 / dover-lap

Licence: MIT license
Python package for combining diarization system outputs.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to dover-lap

Stacking-Blending-Voting-Ensembles
This repository contains an example of each of the Ensemble Learning methods: Stacking, Blending, and Voting. The examples for Stacking and Blending were made from scratch, the example for Voting was using the scikit-learn utility.
Stars: ✭ 34 (-41.38%)
Mutual labels:  ensemble-machine-learning
mesa
NeurIPS’20 | Build powerful ensemble class-imbalanced learning models via meta-knowledge-powered resampler. | 设计元知识驱动的采样器解决类别不平衡问题
Stars: ✭ 88 (+51.72%)
Mutual labels:  ensemble-machine-learning
AIML-Projects
Projects I completed as a part of Great Learning's PGP - Artificial Intelligence and Machine Learning
Stars: ✭ 85 (+46.55%)
Mutual labels:  ensemble-machine-learning
simple diarizer
Simplified diarization pipeline using some pretrained models - audio file to diarized segments in a few lines of code
Stars: ✭ 26 (-55.17%)
Mutual labels:  diarization
UniSpeech
UniSpeech - Large Scale Self-Supervised Learning for Speech
Stars: ✭ 224 (+286.21%)
Mutual labels:  diarization
spyder
Simple Python package for fast DER computation
Stars: ✭ 17 (-70.69%)
Mutual labels:  diarization

DOVER-Lap

Official implementation for DOVER-Lap: A method for combining overlap-aware diarization outputs.

Installation

pip install dover-lap

How to run

After installation, run

dover-lap [OPTIONS] OUTPUT_RTTM [INPUT_RTTMS]...

Example:

dover-lap egs/ami/rttm_dl_test egs/ami/rttm_test_*

Usage instructions

Usage: dover-lap [OPTIONS] OUTPUT_RTTM [INPUT_RTTMS]...

  Apply the DOVER-Lap algorithm on the input RTTM files.

Options:
  --custom-weight TEXT            Weights for input RTTMs
  --dover-weight FLOAT            DOVER weighting factor  [default: 0.1]
  --weight-type [rank|custom]     Specify whether to use rank weighting or
                                  provide custom weights  [default: rank]

  --tie-breaking [uniform|all]    Specify whether to assign tied regions to
                                  all speakers or divide uniformly  [default:
                                  all]

  --second-maximal                If this flag is set, run a second iteration
                                  of the maximal matching for greedy label
                                  mapping  [default: False]

  --sort-first                    If this flag is set, sort inputs by DER
                                  first before label mapping (only applicable
                                  when label mapping type is hungarian)
                                  [default: False]

  --label-mapping [hungarian|greedy]
                                  Choose label mapping algorithm to use
                                  [default: greedy]

  --random-seed INTEGER
  -c, --channel INTEGER           Use this value for output channel IDs
                                  [default: 1]

  -u, --uem-file PATH             UEM file path
  --help                          Show this message and exit.

Note:

  1. If --weight-type custom is used, then --custom-weight must be provided. For example:
dover-lap egs/ami/rttm_dl_test egs/ami/rttm_test_* --weight-type custom --custom-weight '[0.4,0.3,0.3]'
  1. label-mapping can be set to greedy (default) or hungarian, which is a modified version of the mapping technique originally proposed in DOVER.

Results

We provide a sample result on the AMI mix-headset test set. The results can be obtained using spyder, which is automatically installed with dover-lap:

dover-lap egs/ami/rttm_dl_test egs/ami/rttm_test_*
spyder egs/ami/ref_rttm_test egs/ami/rttm_dl_test

and similarly for the input hypothesis. The DER results are shown below.

MS FA Conf. DER
Overlap-aware VB resegmentation 9.84 2.06 9.60 21.50
Overlap-aware spectral clustering 11.48 2.27 9.81 23.56
Region Proposal Network 9.49 7.68 8.25 25.43
DOVER-Lap (Hungarian mapping) 9.81 2.76 8.17 20.73
DOVER-Lap (Greedy mapping)* 9.71 3.02 7.68 20.40

* The Greedy label mapping is exponential in number of inputs (see this paper).

Running time

The algorithm is implemented in pure Python with NumPy for tensor computations. The time complexity is expected to increase exponentially with the number of inputs, but it should be reasonable for combining up to 10 input hypotheses.

For smaller number of inputs (up to 5), the algorithm should take only a few seconds to run on a laptop.

Combining 2 systems with DOVER-Lap

DOVER-Lap is meant to be used to combine more than 2 systems, since black-box voting between 2 systems does not make much sense. Still, if 2 systems are provided as input, we fall back on the Hungarian algorithm for label mapping, since it is provably optimal for this case. Both the systems are assigned equal weights, and in case of voting conflicts, the region is equally divided among the two labels. This is not the intended use case and will almost certainly lead to performance degradation.

Citation

@article{Raj2021Doverlap,
  title={{DOVER-Lap}: A Method for Combining Overlap-aware Diarization Outputs},
  author={D.Raj and P.Garcia and Z.Huang and S.Watanabe and D.Povey and A.Stolcke and S.Khudanpur},
  journal={2021 IEEE Spoken Language Technology Workshop (SLT)},
  year={2021}
}

@article{Raj2021ReformulatingDL,
  title={Reformulating {DOVER-Lap} Label Mapping as a Graph Partitioning Problem},
  author={Desh Raj and S. Khudanpur},
  journal={INTERSPEECH},
  year={2021},
}

Contact

For issues/bug reports, please raise an Issue in this repository, or reach out to me at [email protected].

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].