{"id":16871818,"url":"https://github.com/desh2608/dover-lap","last_synced_at":"2025-03-17T06:31:20.199Z","repository":{"id":38827153,"uuid":"292422269","full_name":"desh2608/dover-lap","owner":"desh2608","description":"Python package for combining diarization system outputs.","archived":false,"fork":false,"pushed_at":"2023-10-12T18:55:55.000Z","size":1055,"stargazers_count":87,"open_issues_count":2,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T08:51:10.797Z","etag":null,"topics":["diarization","dover-lap","ensemble-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/desh2608.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-09-03T00:09:57.000Z","updated_at":"2025-03-02T13:07:31.000Z","dependencies_parsed_at":"2022-08-30T03:50:49.968Z","dependency_job_id":"f46a8874-05a5-4802-ad09-aeae14c47187","html_url":"https://github.com/desh2608/dover-lap","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.0625,"last_synced_commit":"1643ba07c9cb118a825a6f8b67857e81498d1827"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desh2608%2Fdover-lap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desh2608%2Fdover-lap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desh2608%2Fdover-lap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desh2608%2Fdover-lap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desh2608","download_url":"https://codeload.github.com/desh2608/dover-lap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243985829,"owners_count":20379212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diarization","dover-lap","ensemble-machine-learning"],"created_at":"2024-10-13T15:09:49.665Z","updated_at":"2025-03-17T06:31:19.233Z","avatar_url":"https://github.com/desh2608.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["Other software"],"readme":"# DOVER-Lap\nOfficial implementation for [DOVER-Lap: A method for combining overlap-aware diarization outputs](https://arxiv.org/pdf/2011.01997.pdf).\n\n## Installation\n\n```shell\npip install dover-lap\n```\n\n## How to run\n\nAfter installation, run\n\n```shell\ndover-lap [OPTIONS] OUTPUT_RTTM [INPUT_RTTMS]...\n```\n\nExample:\n\n```shell\ndover-lap egs/ami/rttm_dl_test egs/ami/rttm_test_*\n```\n\n## Usage instructions\n\n```shell\nUsage: dover-lap [OPTIONS] OUTPUT_RTTM [INPUT_RTTMS]...\n\n  Apply the DOVER-Lap algorithm on the input RTTM files.\n\nOptions:\n  --gaussian-filter-std FLOAT     Standard deviation for Gaussian filter\n                                  applied before voting. This can help reduce\n                                  the effect of outliers in the input RTTMs.\n                                  For quick turn-taking, set this to a small\n                                  value (e.g. 0.1). 0.5 is a good value for\n                                  most cases. Set this to a very small value,\n                                  e.g. 0.01, to remove filtering.  [default:\n                                  0.5]\n\n  --custom-weight TEXT            Weights for input RTTMs\n  --dover-weight FLOAT            DOVER weighting factor  [default: 0.1]\n  --weight-type [rank|custom|norm]\n                                  Specify whether to use rank weighting or\n                                  provide custom weights  [default: rank]\n\n  --voting-method [average]       Choose voting method to use: average: use\n                                  weighted average to combine input RTTMs\n                                  [default: average]\n\n  --second-maximal                If this flag is set, run a second iteration\n                                  of the maximal matching for greedy label\n                                  mapping  [default: False]\n\n  --label-mapping [hungarian|greedy]\n                                  Choose label mapping algorithm to use\n                                  [default: greedy]\n\n  --random-seed INTEGER\n  -c, --channel INTEGER           Use this value for output channel IDs\n                                  [default: 1]\n\n  -u, --uem-file PATH             UEM file path\n  --help                          Show this message and exit.\n```\n\n**Note:** \n\n1. If `--weight-type custom` is used, then `--custom-weight` must be provided. For example:\n\n```shell\ndover-lap egs/ami/rttm_dl_test egs/ami/rttm_test_* --weight-type custom --custom-weight '[0.4,0.3,0.3]'\n```\n\n2. `label-mapping` can be set to `greedy` (default) or `hungarian`, which is a modified version of the mapping\ntechnique originally proposed in [DOVER](https://arxiv.org/abs/1909.08090).\n\n## Results\n\nWe provide a sample result on the AMI mix-headset test set. The results can be \nobtained using [`spyder`](https://github.com/desh2608/spyder), which is automatically\ninstalled with `dover-lap`:\n\n```shell\ndover-lap egs/ami/rttm_dl_test egs/ami/rttm_test_*\nspyder egs/ami/ref_rttm_test egs/ami/rttm_dl_test\n```\n\nand similarly for the input hypothesis. The DER results are shown below.\n\n|                                   |   MS  |  FA  | Conf. |  DER  |\n|-----------------------------------|:-----:|:----:|:-----:|:-----:|\n| Overlap-aware VB resegmentation   |  9.84 | **2.06** |  9.60 | 21.50 |\n| Overlap-aware spectral clustering | 11.48 | 2.27 |  9.81 | 23.56 |\n| Region Proposal Network           |  **9.49** | 7.68 |  8.25 | 25.43 |\n| DOVER-Lap (Hungarian mapping)     | 9.98 | 2.13 | 8.25 | 20.35 |\n| DOVER-Lap (Greedy mapping)*        | 9.96 | 2.16 |  **7.75** | **19.86** |\n\n_* The Greedy label mapping is exponential in number of inputs (see [this paper](https://arxiv.org/abs/2104.01954))._\n\n## Running time\n\nThe algorithm is implemented in pure Python with NumPy for tensor computations. \nThe time complexity is expected to increase exponentially with the number of \ninputs, but it should be reasonable for combining up to 10 input hypotheses. For \ncombining more than 10 inputs, we recommend setting `--label-mapping hungarian`.\n\nFor smaller number of inputs (up to 5), the algorithm should take only a few seconds\nto run on a laptop.\n\n## Combining 2 systems with DOVER-Lap\n\nDOVER-Lap is meant to be used to combine **more than 2 systems**, since\nblack-box voting between 2 systems does not make much sense. Still, if 2 systems\nare provided as input, we fall back on the Hungarian algorithm for label mapping,\nsince it is provably optimal for this case. Both the systems are assigned equal\nweights, and in case of voting conflicts, the region is assigned to both\nlabels. This is not the intended use case and will almost certainly lead\nto performance degradation.\n\n## Citation\n\n```\n@article{Raj2021Doverlap,\n  title={{DOVER-Lap}: A Method for Combining Overlap-aware Diarization Outputs},\n  author={D.Raj and P.Garcia and Z.Huang and S.Watanabe and D.Povey and A.Stolcke and S.Khudanpur},\n  journal={2021 IEEE Spoken Language Technology Workshop (SLT)},\n  year={2021}\n}\n\n@article{Raj2021ReformulatingDL,\n  title={Reformulating {DOVER-Lap} Label Mapping as a Graph Partitioning Problem},\n  author={Desh Raj and S. Khudanpur},\n  journal={INTERSPEECH},\n  year={2021},\n}\n```\n\n## Contact\n\nFor issues/bug reports, please raise an Issue in this repository, or reach out to me at `draj@cs.jhu.edu`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesh2608%2Fdover-lap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesh2608%2Fdover-lap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesh2608%2Fdover-lap/lists"}