public abstract class BaseImageClassifier extends java.lang.Object implements ImageClassifier<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>>
ImageClassifier.Score| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.lang.String> |
categories |
protected int |
categoryBest |
protected org.ddogleg.struct.FastQueue<ImageClassifier.Score> |
categoryScores |
protected boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> |
imageRgb |
protected int |
imageSize |
protected boofcv.struct.image.ImageType<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>> |
imageType |
protected ClipAndReduce<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>> |
massage |
protected deepboof.graph.FunctionSequence<deepboof.tensors.Tensor_F32,deepboof.Function<deepboof.tensors.Tensor_F32>> |
network |
protected deepboof.tensors.Tensor_F32 |
tensorInput |
protected deepboof.tensors.Tensor_F32 |
tensorOutput |
| Constructor and Description |
|---|
BaseImageClassifier(int imageSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
classify(boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> image)
The original implementation takes in an image then crops it randomly.
|
java.util.List<ImageClassifier.Score> |
getAllResults()
Returns a list of all the likely categories for the image.
|
int |
getBestResult()
Returns the category which was the best fit.
|
java.util.List<java.lang.String> |
getCategories()
Returns a list of all the possible categories that a scene can be classified as
|
boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> |
getImageRgb() |
boofcv.struct.image.ImageType<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>> |
getInputType()
Returns the type of input image
|
protected void |
innerProcess(deepboof.tensors.Tensor_F32 tensorInput) |
protected boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> |
preprocess(boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> image)
Massage the input image into a format recognized by the network
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadModelprotected deepboof.graph.FunctionSequence<deepboof.tensors.Tensor_F32,deepboof.Function<deepboof.tensors.Tensor_F32>> network
protected java.util.List<java.lang.String> categories
protected boofcv.struct.image.ImageType<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>> imageType
protected ClipAndReduce<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>> massage
protected int imageSize
protected boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> imageRgb
protected deepboof.tensors.Tensor_F32 tensorInput
protected deepboof.tensors.Tensor_F32 tensorOutput
protected org.ddogleg.struct.FastQueue<ImageClassifier.Score> categoryScores
protected int categoryBest
public boofcv.struct.image.ImageType<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>> getInputType()
ImageModelBasegetInputType in interface ImageModelBase<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>>public void classify(boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> image)
classify in interface ImageClassifier<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>>image - Image being processed. Must be RGB image. Pixel values must have values from 0 to 255.protected boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> preprocess(boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> image)
protected void innerProcess(deepboof.tensors.Tensor_F32 tensorInput)
public int getBestResult()
ImageClassifiergetBestResult in interface ImageClassifier<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>>public java.util.List<ImageClassifier.Score> getAllResults()
ImageClassifiergetAllResults in interface ImageClassifier<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>>public java.util.List<java.lang.String> getCategories()
ImageClassifiergetCategories in interface ImageClassifier<boofcv.struct.image.Planar<boofcv.struct.image.GrayF32>>public boofcv.struct.image.Planar<boofcv.struct.image.GrayF32> getImageRgb()