Interface ImageClassifier<T extends ImageBase<T>>

All Superinterfaces:
ImageModelBase<T>
All Known Implementing Classes:
BaseImageClassifier, ImageClassifierNiNImageNet, ImageClassifierResNet, ImageClassifierVggCifar10

public interface ImageClassifier<T extends ImageBase<T>> extends ImageModelBase<T>
High level interface for a classifier which assigns a single category to an image.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Provides information on the score for a specific category when multiple results are requested
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    classify(T image)
    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 as

    Methods inherited from interface boofcv.abst.scene.ImageModelBase

    getInputType, loadModel
  • Method Details

    • classify

      void classify(T image)
      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

      List<String> getCategories()
      Returns a list of all the possible categories that a scene can be classified as
      Returns:
      Names of categories