Class ImageClassifierNiNImageNet

java.lang.Object
boofcv.deepboof.BaseImageClassifier
boofcv.deepboof.ImageClassifierNiNImageNet
All Implemented Interfaces:
ImageClassifier<Planar<GrayF32>>, ImageModelBase<Planar<GrayF32>>

public class ImageClassifierNiNImageNet extends BaseImageClassifier

Pretrained Network-in-Network (NiN) image classifier using imagenet data. Trained by szagoruyko [1,2] and achieves 62.6% top1 center crop accuracy on validation set.

[1] https://gist.github.com/szagoruyko/0f5b4c5e2d2b18472854
[2] https://github.com/soumith/imagenet-multiGPU.torch/blob/master/models/ninbn.lua

  • Constructor Details

    • ImageClassifierNiNImageNet

      public ImageClassifierNiNImageNet()
  • Method Details

    • loadModel

      public void loadModel(File directory) throws IOException
      Description copied from interface: ImageModelBase
      Loads the model at the specified location. See documentation of the classifier for what needs to be passed in here.
      Parameters:
      directory - Path to directory or file containing the model
      Throws:
      IOException
    • preprocess

      protected Planar<GrayF32> preprocess(Planar<GrayF32> image)
      Massage the input image into a format recognized by the network
      Overrides:
      preprocess in class BaseImageClassifier