Class ResourceDataSets


  • public class ResourceDataSets
    extends Object
    Top level class for leveraging pre curated datasets The pattern of usage for a default directory is: DataSetResource resource = ResourceDataSets.(..); For specifying a directory, for download it's: DataSetResource customDirResource = ResourceDataSets(yourCustomDirPath); A user can then specify a resource download with: resource.download(..); A user won't normally use this class directly. It's common underlying tooling for the pre existing dataset iterators such as the MNISTDataSetIterator,EMnistDataSetIterator,LFWDataSetIterator as well as the BaseImageLoader
    Author:
    Adam Gibson
    • Constructor Detail

      • ResourceDataSets

        public ResourceDataSets()
    • Method Detail

      • topLevelResourceDir

        public static File topLevelResourceDir()
        The default top level directory for storing data
        Returns:
      • setTopLevelResourceDir

        public static void setTopLevelResourceDir​(File topLevelResourceDir)
        Set the top level directory. If intended for use, this should be set before using any datasets or other resources.
        Parameters:
        topLevelResourceDir - the new directory to use
      • emnistMappingTrain

        public static DataSetResource emnistMappingTrain​(EMnistSet set)
        Download the training file for emnist mapping
        Parameters:
        set - the set to download
        Returns:
        the resource representing the subset
      • emnistMappingTest

        public static DataSetResource emnistMappingTest​(EMnistSet set)
        The input mapping for the test set
        Parameters:
        set -
        Returns:
      • emnistMappingTrain

        public static DataSetResource emnistMappingTrain​(EMnistSet set,
                                                         File topLevelDir)
        The input mapping for the training set
        Parameters:
        set - the emnist subset to use
        topLevelDir - the top level directory to download to
        Returns:
      • emnistMappingTest

        public static DataSetResource emnistMappingTest​(EMnistSet set,
                                                        File topLevelDir)
        The input label mapping for the test set
        Parameters:
        set - the subset of emnist to use
        topLevelDir - the custom top level directory
        Returns:
      • emnistLabelsTrain

        public static DataSetResource emnistLabelsTrain​(EMnistSet set,
                                                        File topLevelDir)
        Parameters:
        set -
        topLevelDir -
        Returns:
      • emnistLabelsTest

        public static DataSetResource emnistLabelsTest​(EMnistSet set,
                                                       File topLevelDir)
        The emnist test labels
        Parameters:
        set - the emnist subset to download
        topLevelDir - the top level directory to use
        Returns:
      • emnistLabelsTrain

        public static DataSetResource emnistLabelsTrain​(EMnistSet set)
        The emnist train labels
        Parameters:
        set - the emnist subset to download
        Returns:
      • emnistLabelsTest

        public static DataSetResource emnistLabelsTest​(EMnistSet set)
        The emnist test labels
        Parameters:
        set - the emnist subset to download
        Returns:
      • emnistTrain

        public static DataSetResource emnistTrain​(EMnistSet set,
                                                  File topLevelDir)
        The emnist train labels
        Parameters:
        set - the emnist subset to download
        topLevelDir - the top level directory to download to
        Returns:
      • emnistTest

        public static DataSetResource emnistTest​(EMnistSet set,
                                                 File topLevelDir)
        The emnist test labels
        Parameters:
        set - the emnist subset to download
        topLevelDir - the top level directory to download to
        Returns:
      • emnistTrain

        public static DataSetResource emnistTrain​(EMnistSet set)
        The emnist test labels
        Parameters:
        set - the emnist subset to download
        Returns:
      • emnistTest

        public static DataSetResource emnistTest​(EMnistSet set)
        The emnist test labels
        Parameters:
        set - the emnist subset to download
        Returns:
      • mnistTrain

        public static DataSetResource mnistTrain​(File topLevelDir)
        The mnist training set
        Parameters:
        topLevelDir - the top level directory ot use
        Returns:
      • mnistTest

        public static DataSetResource mnistTest​(File topLevelDir)
        The mnist test images
        Parameters:
        topLevelDir - the top level directory to download to
        Returns:
      • mnistTrainLabels

        public static DataSetResource mnistTrainLabels​(File topLevelDir)
        The mnist training labels
        Parameters:
        topLevelDir - the top level directory to download to
        Returns:
      • mnistTestLabels

        public static DataSetResource mnistTestLabels​(File topLevelDir)
        The mnist test labels
        Parameters:
        topLevelDir - the top level directory to download to
        Returns:
      • lfwFullLabels

        public static DataSetResource lfwFullLabels​(File topLevelDir)
        Labels for the LFW full dataset
        Parameters:
        topLevelDir - the top level directory to download to
        Returns:
      • lfwFullData

        public static DataSetResource lfwFullData​(File topLevelDir)
        Input images for the LFW full dataset
        Parameters:
        topLevelDir - the top level directory to download to
        Returns:
      • lfwSubData

        public static DataSetResource lfwSubData​(File topLevelDir)
        Input images for the LFW smaller dataset
        Parameters:
        topLevelDir - the top level directory to download to
        Returns:
      • cifar10

        public static DataSetResource cifar10​(File topLevelDir)
        The cifar10 dataset
        Parameters:
        topLevelDir - the top level directory to download to
        Returns: