Package boofcv.abst.scene
Interface ImageClassifier<T extends ImageBase<T>>
- All Superinterfaces:
ImageModelBase<T>
- All Known Implementing Classes:
BaseImageClassifier
,ImageClassifierNiNImageNet
,ImageClassifierResNet
,ImageClassifierVggCifar10
High level interface for a classifier which assigns a single category to an image.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Provides information on the score for a specific category when multiple results are requested -
Method Summary
Modifier and TypeMethodDescriptionvoid
Process the image and determine which category it belongs to.Returns a list of all the likely categories for the image.int
Returns the category which was the best fit.Returns a list of all the possible categories that a scene can be classified asMethods inherited from interface boofcv.abst.scene.ImageModelBase
getInputType, loadModel
-
Method Details
-
classify
Process the image and determine which category it belongs to. Will throw an exception if the model has not been loaded yet.- Parameters:
image
- Image being processed. All pixel values have a range of 0 to 255. If a color image then the bands will be in red, green, blue order.
-
getBestResult
int getBestResult()Returns the category which was the best fit.- Returns:
- best fit category
-
getAllResults
List<ImageClassifier.Score> getAllResults()Returns a list of all the likely categories for the image. What is likely is implementation dependent. Each category should be included at least once and might not be included at all.- Returns:
- List of categories and scores
-
getCategories
Returns a list of all the possible categories that a scene can be classified as- Returns:
- Names of categories
-