Skip to main content

Combine overlap-aware diarization output RTTMs

Project description

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:
  --gaussian-filter-std FLOAT     Standard deviation for Gaussian filter
                                  applied before voting. This can help reduce
                                  the effect of outliers in the input RTTMs.
                                  For quick turn-taking, set this to a small
                                  value (e.g. 0.1). 0.5 is a good value for
                                  most cases. Set this to a very small value,
                                  e.g. 0.01, to remove filtering.  [default:
                                  0.5]

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

  --voting-method [average]       Choose voting method to use: average: use
                                  weighted average to combine input RTTMs
                                  [default: average]

  --second-maximal                If this flag is set, run a second iteration
                                  of the maximal matching for greedy label
                                  mapping  [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.98 2.13 8.25 20.35
DOVER-Lap (Greedy mapping)* 9.96 2.16 7.75 19.86

* 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 combining more than 10 inputs, we recommend setting --label-mapping hungarian.

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 assigned to both 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 draj@cs.jhu.edu.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dover-lap-1.3.1.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

dover_lap-1.3.1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file dover-lap-1.3.1.tar.gz.

File metadata

  • Download URL: dover-lap-1.3.1.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for dover-lap-1.3.1.tar.gz
Algorithm Hash digest
SHA256 6bb0c27eea333795eea15e11775d4519cc52a00834865e2eeab9cc76a859cab6
MD5 67a9363429cd2a773bb5c8759000817c
BLAKE2b-256 a49ecf07cf46dee1117bc913396ba2f5f714f934e2bfa37738325d5f44a91f47

See more details on using hashes here.

File details

Details for the file dover_lap-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: dover_lap-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for dover_lap-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fff21e8e8211b45db5ae5d9b7df03512aef143c852ad978696e66d448309f10
MD5 b33e1b4354ca4ca4c757592b8e76e3b8
BLAKE2b-256 2973b8ebce0f84a212e1cb53f6a9f8119653718e26146b7382ba723a238b324b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page