Package boofcv.deepboof
Class ImageClassifierNiNImageNet
java.lang.Object
boofcv.deepboof.BaseImageClassifier
boofcv.deepboof.ImageClassifierNiNImageNet
- All Implemented Interfaces:
ImageClassifier<Planar<GrayF32>>
,ImageModelBase<Planar<GrayF32>>
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface boofcv.abst.scene.ImageClassifier
ImageClassifier.Score
-
Field Summary
Fields inherited from class boofcv.deepboof.BaseImageClassifier
categories, categoryBest, categoryScores, imageRgb, imageSize, imageType, massage, network, tensorInput, tensorOutput
-
Constructor Summary
-
Method Summary
Methods inherited from class boofcv.deepboof.BaseImageClassifier
classify, getAllResults, getBestResult, getCategories, getImageRgb, getInputType, innerProcess
-
Constructor Details
-
ImageClassifierNiNImageNet
public ImageClassifierNiNImageNet()
-
-
Method Details
-
loadModel
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
Massage the input image into a format recognized by the network- Overrides:
preprocess
in classBaseImageClassifier
-