Class LearnSceneFromFiles


public abstract class LearnSceneFromFiles
extends Object
Abstract class which provides a frame work for learning a scene classifier from a set of images. TODO describe how it provides learning
  • Field Details

  • Constructor Details

    • LearnSceneFromFiles

      public LearnSceneFromFiles()
  • Method Details

    • evaluateTest

      public Confusion evaluateTest()
    • evaluate

      protected Confusion evaluate​(Map<String,​List<String>> set)
      Given a set of images with known classification, predict which scene each one belongs in and compute a confusion matrix for the results.
      set - Set of classified images
      Confusion matrix
    • classify

      protected abstract int classify​(String path)
      Given an image compute which scene it belongs to
      path - Path to input image
      integer corresponding to the scene
    • loadSets

      public void loadSets​(File dirTraining, File dirCross, File dirTest)
    • loadThenSplit

      public void loadThenSplit​(File directory)
    • findImages

      @Nullable public static @Nullable Map<String,​List<String>> findImages​(File rootDir)
      Loads the paths to image files contained in subdirectories of the root directory. Each sub directory is assumed to be a different category of images.
    • getScenes

      public List<String> getScenes()