Class LearnSceneFromFiles

java.lang.Object
boofcv.alg.bow.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.
      Parameters:
      set - Set of classified images
      Returns:
      Confusion matrix
    • classify

      protected abstract int classify(String path)
      Given an image compute which scene it belongs to
      Parameters:
      path - Path to input image
      Returns:
      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()