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

Persephone refactor #138

Merged
merged 9 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ The full API is described in the documentation page [https://hyperion-ml.readthe
### Prerequisites

We use anaconda or miniconda, though you should be able to make it work in other python distributions
To start, you should create a new enviroment and install PyTorch>=1.9, (older versions are not supported any longer) e.g.:
To start, you should create a new enviroment and install PyTorch:
```
conda create --name ${your_env} python=3.8
conda create --name ${your_env} python=3.11
conda activate ${your_env}
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=10.2 -c pytorch
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
```
In next Hyperion versions, we will upgrade to Pytorch>=1.9 and drop compatibility with older PyTorch versions.

For systems with cuda 10.2 driver:
```
conda create --name ${your_env} python=3.10
conda activate ${your_env}
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=10.2 -c pytorch
```


### Installing Hyperion

Expand Down
9 changes: 1 addition & 8 deletions egs/sre19-av-v/v0.1/steps_be/face_be_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
Copyright 2019 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division

import logging
import numpy as np

from hyperion.utils.utt2info import Utt2Info
from hyperion.utils.math import softmax
from hyperion.utils.math_funcs import softmax
from hyperion.io import RandomAccessDataReaderFactory as DRF
from hyperion.np.transforms import LNorm
from hyperion.np.clustering import AHC
Expand All @@ -23,9 +19,6 @@ def lnorm(x):

def cosine_scr(x1, x2):

# t = LNorm()
# x1 = t.predict(x1)
# x2 = t.predict(x2)
x1 = lnorm(x1)
x2 = lnorm(x2)
return np.dot(x1, x2.T)
Expand Down
2 changes: 1 addition & 1 deletion egs/sre20-cts/v1/steps_be/eval-tel-be-snorm-v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from hyperion.hyp_defs import float_cpu, config_logger
from hyperion.utils import TrialNdx, TrialScores
from hyperion.helpers import TrialDataReader as TDR
from hyperion.utils.math import cosine_scoring
from hyperion.utils.math_funcs import cosine_scoring
from hyperion.np.pdfs import PLDA
from hyperion.np.transforms import TransformList
from hyperion.np.score_norm import AdaptSNorm as SNorm
Expand Down
2 changes: 1 addition & 1 deletion egs/sre20-cts/v1/steps_be/eval-tel-be-v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from hyperion.hyp_defs import float_cpu, config_logger
from hyperion.utils import TrialNdx, TrialScores
from hyperion.utils.math import cosine_scoring
from hyperion.utils.math_funcs import cosine_scoring
from hyperion.np.pdfs import PLDA
from hyperion.helpers import TrialDataReader as TDR
from hyperion.helpers import PLDAFactory as F
Expand Down
2 changes: 1 addition & 1 deletion egs/sre20-cts/v1/steps_be/train-tel-be-knn-v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from hyperion.np.transforms import TransformList, PCA, LDA, LNorm
from hyperion.helpers import PLDAFactory as F
from hyperion.utils.utt2info import Utt2Info
from hyperion.utils.math import cosine_scoring
from hyperion.utils.math_funcs import cosine_scoring

from numpy.linalg import matrix_rank

Expand Down
2 changes: 1 addition & 1 deletion egs/sre20-cts/v1/steps_be/train-tel-be-knn-v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from hyperion.np.transforms import TransformList, PCA, LDA, LNorm
from hyperion.helpers import PLDAFactory as F
from hyperion.utils.utt2info import Utt2Info
from hyperion.utils.math import cosine_scoring
from hyperion.utils.math_funcs import cosine_scoring

from numpy.linalg import matrix_rank, svd

Expand Down
2 changes: 1 addition & 1 deletion egs/sre20-cts/v1/steps_be/train-tel-be-knn-v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from hyperion.np.transforms import TransformList, PCA, LDA, LNorm
from hyperion.helpers import PLDAFactory as F
from hyperion.utils.utt2info import Utt2Info
from hyperion.utils.math import cosine_scoring
from hyperion.utils.math_funcs import cosine_scoring

from numpy.linalg import matrix_rank, svd

Expand Down
2 changes: 1 addition & 1 deletion egs/voxceleb/adv.v2/steps_backend/eval-be-cos-Nvs1.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from hyperion.hyp_defs import float_cpu, config_logger
from hyperion.utils import TrialNdx, TrialScores
from hyperion.utils.math import cosine_scoring
from hyperion.utils.math_funcs import cosine_scoring
from hyperion.np.pdfs import PLDA
from hyperion.helpers import TrialDataReader as TDR
from hyperion.helpers import PLDAFactory as F
Expand Down
2 changes: 1 addition & 1 deletion egs/voxceleb/adv.v2/steps_backend/eval-be-cos.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from hyperion.hyp_defs import float_cpu, config_logger
from hyperion.utils import TrialNdx, TrialScores
from hyperion.utils.math import cosine_scoring
from hyperion.utils.math_funcs import cosine_scoring
from hyperion.helpers import TrialDataReader as TDR
from hyperion.helpers import PLDAFactory as F
from hyperion.np.transforms import TransformList
Expand Down
2 changes: 2 additions & 0 deletions egs/voxceleb/v1.1/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# VoxCeleb V1.1

This recipe will be deprecated, use V1.2

Recipe for the VoxCeleb Speaker Verification Task

## Differences w.r.t VoxCeleb V1 recipe
Expand Down
1 change: 1 addition & 0 deletions egs/voxceleb/v1.1/conf/vad_16k.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ vad_energy_threshold: 5.5
vad_energy_mean_scale: 0.5
vad_proportion_threshold: 0.12
vad_frames_context: 2
wav_scale: 32767
Loading