Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,97 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
tags:
|
| 5 |
+
- audio
|
| 6 |
+
- speech-separation
|
| 7 |
+
- target-speech-extraction
|
| 8 |
+
- speaker-diarization
|
| 9 |
+
- tf-gridnet
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# dagger β Phase 2 DoD extractor (scratch-trained 3/4/5-speaker curriculum, LibriMix)
|
| 13 |
+
|
| 14 |
+
The checkpoint `dagger`'s **Phase 2 final numbers are reported from**: a TF-GridNet +
|
| 15 |
+
cross-attention extractor `G(x_O, Δ_i)` conditioned on a TitaNet speaker embedding, which
|
| 16 |
+
extracts every speaker from the **untouched original mixture** rather than a running
|
| 17 |
+
residual ([`CLAUDE.md` Β§1](https://github.com/RohanBanerjee88/dagger/blob/main/CLAUDE.md#1-the-one-rule-you-must-never-break)).
|
| 18 |
+
|
| 19 |
+
Unlike the earlier Phase 1 / Phase 2 checkpoints, this one is trained **from random init by a
|
| 20 |
+
single command** β no warm-start chain β so every reported number is regenerable from one
|
| 21 |
+
config.
|
| 22 |
+
|
| 23 |
+
- **Repo / code:** https://github.com/RohanBanerjee88/dagger
|
| 24 |
+
- **Training config:** [`configs/phase2/dod/phase2_librimix_curriculum_3_4_5_train_scratch.yaml`](https://github.com/RohanBanerjee88/dagger/blob/main/configs/phase2/dod/phase2_librimix_curriculum_3_4_5_train_scratch.yaml)
|
| 25 |
+
(`--system proposed`). Multi-depth curriculum: batches interleaved from **three loaders**
|
| 26 |
+
(`n_src` 3, 4, 5; 800 scheduled-placement Libri3Mix train-360 scenes each, 2400 total),
|
| 27 |
+
10 epochs, batch 4, lr 3e-4, `grad_clip 50`, one T4, ~6.5 h. "Curriculum" here means
|
| 28 |
+
*several overlap depths in one run*, not easy-to-hard ordering.
|
| 29 |
+
- **Eval configs:** [`configs/phase2/dod/phase2_librimix_{3,4,5}spk_eval_scratch.yaml`](https://github.com/RohanBanerjee88/dagger/tree/main/configs/phase2/dod)
|
| 30 |
+
β 150 test scenes each, oracle diarization, tag `scratch345clip50`.
|
| 31 |
+
- **Sample rate:** 8 kHz.
|
| 32 |
+
- **Speaker counts seen in training:** 3, 4, 5 (recorded in the checkpoint as `trained_n_src`).
|
| 33 |
+
|
| 34 |
+
## Results
|
| 35 |
+
|
| 36 |
+
Phase 2's claims are **relative**: every comparison holds scenes, mixture and checkpoint
|
| 37 |
+
fixed and varies only the reconstruction strategy.
|
| 38 |
+
|
| 39 |
+
- **Ordering, 9 of 9 slices:** `coarse_to_fine > gated_deflation > ungated_deflation` at every
|
| 40 |
+
overlap depth 2β5 across all three eval sets. Holds on both scratch checkpoints (18/18) and
|
| 41 |
+
on every warm-started checkpoint before them.
|
| 42 |
+
- **Accumulation** (`ungated_deflation`, SI-SDR vs. number of prior estimates subtracted into
|
| 43 |
+
the residual; m=5 at depth 5, n=150 per level): `-4.97 β -5.89 β -6.31 β -7.00 β -6.78`,
|
| 44 |
+
**-1.81 dB** total, monotone through the body of the chain. The terminal step is the
|
| 45 |
+
one-and-rest endpoint and flattens β a benign case of Theorem 2's `βE_mβ β€ mΒ·Ξ΅` upper bound.
|
| 46 |
+
- **Absolute SI-SDR** (`no_recursion`, deepest depth per set): 3spk **-1.29**, 4spk **-3.47**,
|
| 47 |
+
5spk **-4.87** dB. Negative at depths 4β5 for *every* system, including the one with no
|
| 48 |
+
deflation logic β this is the extractor's operating point under a small training budget
|
| 49 |
+
(~2,000 steps at `n_src=3` vs. Phase 1's 15,000), not the reconstruction strategy.
|
| 50 |
+
|
| 51 |
+
Full tables, spread, `n` and diagnostic counts:
|
| 52 |
+
[`results/phase2/dod_final/`](https://github.com/RohanBanerjee88/dagger/tree/main/results/phase2/dod_final).
|
| 53 |
+
|
| 54 |
+
## Caveats
|
| 55 |
+
|
| 56 |
+
- **The ordering is checkpoint-robust; the accumulation *magnitude* is not.** It measures
|
| 57 |
+
~1.8 dB on scratch-trained curriculum checkpoints (replicated twice, agreeing to 0.08 dB per
|
| 58 |
+
level) and 5.30 dB on the earlier warm-started chain trained on the same curriculum recipe.
|
| 59 |
+
Quote the magnitude as a range with the checkpoint named.
|
| 60 |
+
- **Oracle diarization only.** Real-diarization robustness is Phase 3 and not yet measured.
|
| 61 |
+
- **Synthetic 8 kHz LibriMix** (English read speech, hard boundaries, no reverb). Real-corpora
|
| 62 |
+
numbers are Phase 4.
|
| 63 |
+
- **Set `refine.rounds: 0` unless you have contaminated enrollment.** Embedding refinement was
|
| 64 |
+
measured net-harmful under clean enrollment (-0.07 to -0.41 dB across 9 slices, gate healthy).
|
| 65 |
+
- Research artifact for reproducing the Phase 2 experiment β not a production separation model.
|
| 66 |
+
|
| 67 |
+
## Files
|
| 68 |
+
|
| 69 |
+
- `proposed_librimix_curriculum_3_4_5_scratch_clip50.pt` β a `torch.save` dict with
|
| 70 |
+
`state_dict`, `model_config`, `system`, `trained_n_src`. The architecture must match exactly
|
| 71 |
+
or `load_state_dict` raises: `hidden_channels 64`, `n_blocks 6`, `n_fft 256`, `hop_length 64`,
|
| 72 |
+
`n_heads 4`, `n_tokens 8`, `cross_attn_blocks 6`.
|
| 73 |
+
|
| 74 |
+
## License
|
| 75 |
+
|
| 76 |
+
Apache-2.0, matching the `dagger` repository.
|
| 77 |
+
|
| 78 |
+
**Dependency note (same as the Phase 1/2 checkpoints):** at inference `dagger` loads NVIDIA's
|
| 79 |
+
**TitaNet-Large** (`nvidia/speakerverification_en_titanet_large`) as the frozen speaker encoder
|
| 80 |
+
`Ο`, via NeMo (Apache-2.0). TitaNet-Large is **CC-BY-4.0 by NVIDIA, a separate model, and is
|
| 81 |
+
NOT bundled here** β this repo's Apache-2.0 covers only the extractor weights uploaded here.
|
| 82 |
+
Canonical text: [`NOTICE`](https://github.com/RohanBanerjee88/dagger/blob/main/NOTICE).
|
| 83 |
+
|
| 84 |
+
## Usage
|
| 85 |
+
|
| 86 |
+
```python
|
| 87 |
+
from huggingface_hub import hf_hub_download
|
| 88 |
+
import torch
|
| 89 |
+
|
| 90 |
+
ckpt_path = hf_hub_download(
|
| 91 |
+
repo_id="AdityaAA2004/dagger-phase2-curriculum-3-4-5-scratch",
|
| 92 |
+
filename="proposed_librimix_curriculum_3_4_5_scratch_clip50.pt",
|
| 93 |
+
)
|
| 94 |
+
state = torch.load(ckpt_path, map_location="cpu")
|
| 95 |
+
state["state_dict"], state["model_config"], state["trained_n_src"]
|
| 96 |
+
# load into dagger.extract.tfgridnet_crossattn β see the repo for the full
|
| 97 |
+
# pipeline (diarization -> enrollment -> extraction -> reconstruction).
|