dcase_framework.datasets.Dataset

class dcase_framework.datasets.Dataset(*args, **kwargs)[source]

Dataset base class

The specific dataset classes are inherited from this class, and only needed methods are reimplemented.

Constructor

Parameters:

name : str

storage_name : str

data_path : str

Basepath where the dataset is stored. (Default value=’data’)

logger : logger

Instance of logging Default value “none”

show_progress_in_console : bool

Show progress in console. Default value “True”

log_system_progress : bool

Show progress in log. Default value “False”

use_ascii_progress_bar : bool

Show progress bar using ASCII characters. Use this if your console does not support UTF-8 characters. Default value “False”

__init__(*args, **kwargs)[source]

Constructor

Parameters:

name : str

storage_name : str

data_path : str

Basepath where the dataset is stored. (Default value=’data’)

logger : logger

Instance of logging Default value “none”

show_progress_in_console : bool

Show progress in console. Default value “True”

log_system_progress : bool

Show progress in log. Default value “False”

use_ascii_progress_bar : bool

Show progress bar using ASCII characters. Use this if your console does not support UTF-8 characters. Default value “False”

Methods

__init__(\*args, \*\*kwargs) Constructor
absolute_to_relative(path) Converts absolute path into relative path.
check_filelist() Generates hash from file list and check does it matches with one saved in filelist.hash.
download_packages() Download dataset packages over the internet to the local path
error_meta_count() Number of error meta data items.
eval([fold]) List of evaluation items.
eval_files([fold]) List of evaluation files.
event_labels() List of unique event labels in the meta data.
extract(\*args, \*\*kwargs) Extract the dataset packages
file_error_meta(filename) Error meta data for given file
file_meta(filename) Meta data for given file
folds([mode]) List of fold ids
initialize()
relative_to_absolute_path(path) Converts relative path into absolute path.
show_info()
test([fold]) List of testing items.
test_files([fold]) List of testing files.
train([fold]) List of training items.
train_files([fold]) List of training files.
validation_files([fold]) List of validation files if they are specified by the dataset.

Attributes

audio_file_count Get number of audio files in dataset
audio_files Get all audio files in the dataset
audio_tag_count Number of unique audio tags in the meta data.
audio_tags List of unique audio tags in the meta data.
error_meta Get audio error meta data for dataset.
event_label_count Number of unique event labels in the meta data.
fold_count Number of fold in the evaluation setup.
meta Get meta data for dataset.
meta_count Number of meta data items.
scene_label_count Number of unique scene labels in the meta data.
scene_labels List of unique scene labels in the meta data.