labeled_dir_dataset
LabeledDirDataset
¶
Bases: InMemoryDataset
A dataset which reads files from a folder hierarchy like root/class(/es)/data.file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_dir |
str
|
The path to the directory containing data sorted by folders. |
required |
data_key |
str
|
What key to assign to the data values in the data dictionary. |
'x'
|
label_key |
str
|
What key to assign to the label values in the data dictionary. |
'y'
|
label_mapping |
Optional[Dict[str, Any]]
|
A dictionary defining the mapping to use. If not provided will map classes to int labels. |
None
|
file_extension |
Optional[str]
|
If provided then only files ending with the file_extension will be included. |
None
|
Source code in fastestimator/fastestimator/dataset/labeled_dir_dataset.py
summary
¶
Generate a summary representation of this dataset. Returns: A summary representation of this dataset.