Datasets¶
Classes for dataset handling
Dataset - Base class¶
This is the base class, and all the specialized datasets are inherited from it. One should never use base class itself.
Usage examples:
1 2 3 4 5 6 7 8 9 10 11 | # Create class
dataset = TUTAcousticScenes_2017_DevelopmentSet(data_path='data')
# Initialize dataset, this will make sure dataset is downloaded, packages are extracted, and needed meta files are created
dataset.initialize()
# Show meta data
dataset.meta.show()
# Get all evaluation setup folds
folds = dataset.folds()
# Get all evaluation setup folds
train_data_fold1 = dataset.train(fold=folds[0])
test_data_fold1 = dataset.test(fold=folds[0])
|
Dataset (\*args, \*\*kwargs) |
Dataset base class |
Dataset.initialize () |
|
Dataset.show_info () |
|
Dataset.audio_files |
Get all audio files in the dataset |
Dataset.audio_file_count |
Get number of audio files in dataset |
Dataset.meta |
Get meta data for dataset. |
Dataset.meta_count |
Number of meta data items. |
Dataset.error_meta |
Get audio error meta data for dataset. |
Dataset.error_meta_count () |
Number of error meta data items. |
Dataset.fold_count |
Number of fold in the evaluation setup. |
Dataset.scene_labels |
List of unique scene labels in the meta data. |
Dataset.scene_label_count |
Number of unique scene labels in the meta data. |
Dataset.event_labels () |
List of unique event labels in the meta data. |
Dataset.event_label_count |
Number of unique event labels in the meta data. |
Dataset.audio_tags |
List of unique audio tags in the meta data. |
Dataset.audio_tag_count |
Number of unique audio tags in the meta data. |
Dataset.download_packages () |
Download dataset packages over the internet to the local path |
Dataset.extract (\*args, \*\*kwargs) |
Extract the dataset packages |
Dataset.train ([fold]) |
List of training items. |
Dataset.test ([fold]) |
List of testing items. |
Dataset.eval ([fold]) |
List of evaluation items. |
Dataset.train_files ([fold]) |
List of training files. |
Dataset.test_files ([fold]) |
List of testing files. |
Dataset.eval_files ([fold]) |
List of evaluation files. |
Dataset.validation_files ([fold]) |
List of validation files if they are specified by the dataset. |
Dataset.folds ([mode]) |
List of fold ids |
Dataset.file_meta (filename) |
Meta data for given file |
Dataset.file_error_meta (filename) |
Error meta data for given file |
Dataset.file_error_meta (filename) |
Error meta data for given file |
Dataset.relative_to_absolute_path (path) |
Converts relative path into absolute path. |
Dataset.absolute_to_relative (path) |
Converts absolute path into relative path. |
AcousticSceneDataset¶
AcousticSceneDataset (\*args, \*\*kwargs) |
Specialized classes inherited AcousticSceneDataset:
TUTAcousticScenes_2017_DevelopmentSet (\*args, ...) |
TUT Acoustic scenes 2017 development dataset |
TUTAcousticScenes_2016_DevelopmentSet (\*args, ...) |
TUT Acoustic scenes 2016 development dataset |
TUTAcousticScenes_2016_EvaluationSet (\*args, ...) |
TUT Acoustic scenes 2016 evaluation dataset |
SoundEventDataset¶
SoundEventDataset (\*args, \*\*kwargs) |
|
SoundEventDataset.event_label_count ([...]) |
Number of unique scene labels in the meta data. |
SoundEventDataset.event_labels ([scene_label]) |
List of unique event labels in the meta data. |
SoundEventDataset.train ([fold, scene_label, ...]) |
List of training items. |
SoundEventDataset.test ([fold, scene_label, ...]) |
List of testing items. |
Specialized classes inherited SoundEventDataset:
TUTRareSoundEvents_2017_DevelopmentSet (...) |
TUT Acoustic scenes 2017 development dataset |
TUTSoundEvents_2017_DevelopmentSet (\*args, ...) |
TUT Sound events 2017 development dataset |
TUTSoundEvents_2016_DevelopmentSet (\*args, ...) |
TUT Sound events 2016 development dataset |
TUTSoundEvents_2016_EvaluationSet (\*args, ...) |
TUT Sound events 2016 evaluation dataset |
AudioTaggingDataset¶
AudioTaggingDataset (\*args, \*\*kwargs) |