megatron.data.image_folder#
Description
Classes
|
A generic data loader where the samples are arranged in this way: . |
|
A generic data loader where the images are arranged in this way: . |
Functions
|
|
|
|
|
Checks if a file is an allowed extension. |
|
Checks if a file is an allowed image extension. |
|
Generates a list of samples of a form (path_to_sample, class). :param directory: root dataset directory :type directory: str :param class_to_idx: dictionary mapping class name to class index :type class_to_idx: Dict[str, int] :param extensions: A list of allowed extensions. Either extensions or is_valid_file should be passed. Defaults to None. :type extensions: optional :param is_valid_file: A function that takes path of a file and checks if the file is a valid file (used to check of corrupt files) both extensions and is_valid_file should not be passed. Defaults to None. :type is_valid_file: optional. |
|