Package boofcv.alg.bow
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 Summary
-
Constructor Summary
Constructors Constructor Description LearnSceneFromFiles()
-
Method Summary
Modifier and Type Method Description protected abstract int
classify(String path)
Given an image compute which scene it belongs toprotected 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.Confusion
evaluateTest()
static @Nullable Map<String,List<String>>
findImages(File rootDir)
Loads the paths to image files contained in subdirectories of the root directory.List<String>
getScenes()
void
loadSets(File dirTraining, File dirCross, File dirTest)
void
loadThenSplit(File directory)
-
Field Details
-
rand
-
scenes
-
train
-
cross
-
test
-
-
Constructor Details
-
LearnSceneFromFiles
public LearnSceneFromFiles()
-
-
Method Details
-
evaluateTest
-
evaluate
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
Given an image compute which scene it belongs to- Parameters:
path
- Path to input image- Returns:
- integer corresponding to the scene
-
loadSets
-
loadThenSplit
-
findImages
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
-