draugr.numpy_utilities.datasets.categorical.deep_category.build_deep_categorical_dataset¶
- draugr.numpy_utilities.datasets.categorical.deep_category.build_deep_categorical_dataset(directory: Union[Path, str], *, validation_percentage: float = 15, testing_percentage: float = 0, extensions: Iterable = ('png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG', 'gif', 'GIF'), is_valid_file: callable = None) dict [source]¶
Builds a list of training images from the file system.
Analyzes the sub folders in the image directory, splits them into stable training, testing, and validation sets, and returns a data structure describing the lists of images for each label and their paths.
Args: image_directory: String path to a folder containing subfolders of images. testing_percentage: Integer percentage of the images to reserve for tests. validation_percentage: Integer percentage of images reserved for validation.
Returns: An OrderedDict containing an entry for each label subfolder, with images split into training, testing, and validation sets within each label. The order of items defines the class indices.
- param is_valid_file
- param directory
- param validation_percentage
- param testing_percentage
- Parameters
extensions –