Shortcuts

asteroid.data.musdb18_dataset module

class asteroid.data.musdb18_dataset.MUSDB18Dataset(root, sources=['vocals', 'bass', 'drums', 'other'], targets=None, suffix='.wav', split='train', subset=None, segment=None, samples_per_track=1, random_segments=False, random_track_mix=False, source_augmentations=<function MUSDB18Dataset.<lambda>>, sample_rate=44100)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

MUSDB18 music separation dataset

The dataset consists of 150 full lengths music tracks (~10h duration) of different genres along with their isolated stems:

drums, bass, vocals and others.

Out-of-the-box, asteroid does only support MUSDB18-HQ which comes as uncompressed WAV files. To use the MUSDB18, please convert it to WAV first:

Note

The datasets are hosted on Zenodo and require that users request access, since the tracks can only be used for academic purposes. We manually check this requests.

This dataset asssumes music tracks in (sub)folders where each folder has a fixed number of sources (defaults to 4). For each track, a list of sources and a common suffix can be specified. A linear mix is performed on the fly by summing up the sources

Due to the fact that all tracks comprise the exact same set of sources, random track mixing can be used can be used, where sources from different tracks are mixed together.

Folder Structure:
>>> #train/1/vocals.wav ---------|
>>> #train/1/drums.wav ----------+--> input (mix), output[target]
>>> #train/1/bass.wav -----------|
>>> #train/1/other.wav ---------/
Parameters:
  • root (str) – Root path of dataset
  • sources (list of str, optional) – List of source names that composes the mixture. Defaults to MUSDB18 4 stem scenario: vocals, drums, bass, other.
  • targets (list or None, optional) –

    List of source names to be used as targets. If None, a dict with the 4 stems is returned.

    If e.g [vocals, drums], a tensor with stacked vocals and drums is returned instead of a dict. Defaults to None.
  • suffix (str, optional) – Filename suffix, defaults to .wav.
  • split (str, optional) – Dataset subfolder, defaults to train.
  • subset (list of str, optional) – Selects a specific of list of tracks to be loaded, defaults to None (loads all tracks).
  • segment (float, optional) – Duration of segments in seconds, defaults to None which loads the full-length audio tracks.
  • samples_per_track (int, optional) – Number of samples yielded from each track, can be used to increase dataset size, defaults to 1.
  • random_segments (boolean, optional) – Enables random offset for track segments.
  • boolean (random_track_mix) – enables mixing of random sources from different tracks to assemble mix.
  • source_augmentations (list of callable) – list of augmentation function names, defaults to no-op augmentations (input = output)
  • sample_rate (int, optional) – Samplerate of files in dataset.
Variables:
  • root (str) – Root path of dataset
  • sources (list of str, optional) – List of source names. Defaults to MUSDB18 4 stem scenario: vocals, drums, bass, other.
  • suffix (str, optional) – Filename suffix, defaults to .wav.
  • split (str, optional) – Dataset subfolder, defaults to train.
  • subset (list of str, optional) – Selects a specific of list of tracks to be loaded, defaults to None (loads all tracks).
  • segment (float, optional) – Duration of segments in seconds, defaults to None which loads the full-length audio tracks.
  • samples_per_track (int, optional) – Number of samples yielded from each track, can be used to increase dataset size, defaults to 1.
  • random_segments (boolean, optional) – Enables random offset for track segments.
  • boolean (random_track_mix) – enables mixing of random sources from different tracks to assemble mix.
  • source_augmentations (list of callable) – list of augmentation function names, defaults to no-op augmentations (input = output)
  • sample_rate (int, optional) – Samplerate of files in dataset.
  • tracks (list of Dict) – List of track metadata
References
“The 2018 Signal Separation Evaluation Campaign” Stoter et al. 2018.
dataset_name = 'MUSDB18'[source]
get_tracks()[source]

Loads input and output tracks

get_infos()[source]

Get dataset infos (for publishing models).

Returns:dict, dataset infos with keys dataset, task and licences.
Read the Docs v: v0.4.4
Versions
latest
stable
v0.4.4
v0.4.3
v0.4.2
v0.4.1
v0.4.0
v0.3.5_b
v0.3.4
v0.3.3
v0.3.2
v0.3.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.