Documentation of 'org.neuroph.imgrec.ImageRecognitionHelper' Java class
ImageRecognitionHelper
org.neuroph.imgrec

Class ImageRecognitionHelper



  • public class ImageRecognitionHelper
    extends java.lang.Object
    Provides methods to create neural network and training set for image recognition. This class is mostly based on the code from tileclassification utility by Jon Tait
    • Constructor Detail

      • ImageRecognitionHelper

        public ImageRecognitionHelper()
    • Method Detail

      • createNewNeuralNetwork

        public static NeuralNetwork createNewNeuralNetwork(java.lang.String label,
                                                           Dimension samplingResolution,
                                                           ColorMode colorMode,
                                                           java.util.List<java.lang.String> imageLabels,
                                                           java.util.List<java.lang.Integer> layersNeuronsCount,
                                                           TransferFunctionType transferFunctionType)
        Creates and returns new neural network for image recognition. Assumes that all of the FractionRgbData objects in the given map have identical length arrays in them so that the input layer of the neural network can be created here.
        Parameters:
        label - neural network label
        samplingResolution - sampling resolution (image size)
        imageLabels - image labels
        layersNeuronsCount - neuron counts in hidden layers
        transferFunctionType - type of transfer function to use for neurons in network
        colorMode - color mode
        Returns:
      • createTrainingSet

        public static DataSet createTrainingSet(java.util.List<java.lang.String> imageLabels,
                                                java.util.Map<java.lang.String,FractionRgbData> rgbDataMap)
        Deprecated. Use createRGBTrainingSet instead
        Creates training set for the specified image labels and rgb data. Thi method is now forwarded to createRGBTrainingSet
        Parameters:
        imageLabels - image labels
        rgbDataMap - map collection of rgb data
        Returns:
        training set for the specified image data
      • createRGBTrainingSet

        public static DataSet createRGBTrainingSet(java.util.List<java.lang.String> imageLabels,
                                                   java.util.Map<java.lang.String,FractionRgbData> rgbDataMap)
        Creates training set for the specified image labels and rgb data
        Parameters:
        imageLabels - image labels
        rgbDataMap - map collection of rgb data
        Returns:
        training set for the specified image data
      • createHSLTrainingSet

        public static DataSet createHSLTrainingSet(java.util.List<java.lang.String> imageLabels,
                                                   java.util.Map<java.lang.String,FractionHSLData> hslDataMap)
        Creates training set for the specified image labels and hsl data
        Parameters:
        imageLabels - image labels
        hslDataMap - map colletction of hsl data
        Returns:
        training set for the specified image data
      • createBlackAndWhiteTrainingSet

        public static DataSet createBlackAndWhiteTrainingSet(java.util.List<java.lang.String> imageLabels,
                                                             java.util.Map<java.lang.String,FractionRgbData> rgbDataMap)
                                                      throws VectorSizeMismatchException
        Creates binary black and white training set for the specified image labels and rgb data white = 0 black = 1
        Parameters:
        imageLabels - image labels
        rgbDataMap - map collection of rgb data
        Returns:
        binary black and white training set for the specified image data
        Throws:
        VectorSizeMismatchException
      • getFractionRgbDataForDirectory

        public static java.util.Map<java.lang.String,FractionRgbData> getFractionRgbDataForDirectory(java.io.File imgDir,
                                                                                                     Dimension samplingResolution)
                                                                                              throws java.io.IOException
        Loads images from the specified dir, scales to specified resolution and creates RGB data for each image Puts HSL data in a Map using filenames as keys, and returns that map
        Parameters:
        imgDir -
        samplingResolution -
        Throws:
        java.io.IOException
      • getFractionHSLDataForDirectory

        public static java.util.Map<java.lang.String,FractionHSLData> getFractionHSLDataForDirectory(java.io.File imgDir,
                                                                                                     Dimension samplingResolution)
                                                                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • createImageDataSetFromFile

        public static DataSet createImageDataSetFromFile(java.lang.String imageDir,
                                                         java.util.List<java.lang.String> imageLabels,
                                                         java.lang.String junkDir,
                                                         ColorMode colorMode,
                                                         Dimension samplingResolution,
                                                         java.lang.String trainingSetName,
                                                         int numOfPictures)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.