Skip to content

Latest commit

 

History

History
103 lines (81 loc) · 2.45 KB

README.md

File metadata and controls

103 lines (81 loc) · 2.45 KB

DEAR Dataset Code

This is a torch.utils.data.Dataset class for the Deep Evaluation of Acoustic Representations (DEAR) dataset. The corresponding paper is on the arXiv and the data is on Zenodo.

Usage

Copy the dear directory to the source repository, then spawn a Dataset for an evaluation task using the desired class.

Environment

environment_eval_dataset = EnvironmentDEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    target_variable_type=TargetVariableType.DISCRETE,
)

Indoor or Outdoor

indoor_or_outdoor_eval_dataset = IndoorOutdoorDEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    target_variable_type=TargetVariableType.DISCRETE,
)

Stationary or Transient Noise

noise_eval_dataset = StationaryTransientNoiseDEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    target_variable_type=TargetVariableType.DISCRETE,
)

Signal to Noise Ration (SNR)

snr_eval_dataset = SNRDEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    target_variable_type=TargetVariableType.CONTINUOUS,
)

Speech Present

speech_present_eval_dataset = SpeechDEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    speech_present=True,
    target_variable_type=TargetVariableType.DISCRETE,
)

Speakers Active

speakers_active_eval_dataset = SpeechDEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    speech_present=False,
    target_variable_type=TargetVariableType.CONTINUOUS,
)

Direct-to-Reverberant Ratio (DRR)

drr_eval_dataset = DRRDEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    target_variable_type=TargetVariableType.CONTINUOUS,
)

RT60

rt60_eval_dataset = RT60DEARDataset(
    base_path=Path("/data/evaluation/dear"),
    split=DatasetType.TRAIN,
    target_variable_type=TargetVariableType.CONTINUOUS,
)

Example

Use the standard PyTorch pattern to run the evaluation, e.g.

model = Wav2Vec2Model()
for segments, labels in rt60_eval_dataset:
    predicted_labels = model(segments)
    score = metric(labels, predicted_labels)