MODEL_CLASS - class of machine learning modelpublic abstract class AbstractImageClassifier<IMAGE_CLASS,MODEL_CLASS> extends Object implements ImageClassifier<IMAGE_CLASS>
ImageClassifier is String| Modifier | Constructor and Description |
|---|---|
protected |
AbstractImageClassifier(Class<IMAGE_CLASS> imgCls,
MODEL_CLASS model) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Float> |
classify(File file) |
Map<String,Float> |
classify(InputStream inputStream) |
ImageFactory<IMAGE_CLASS> |
getImageFactory() |
MODEL_CLASS |
getModel() |
float |
getThreshold() |
void |
setModel(MODEL_CLASS model) |
void |
setThreshold(float threshold) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclassifyprotected AbstractImageClassifier(Class<IMAGE_CLASS> imgCls, MODEL_CLASS model)
public ImageFactory<IMAGE_CLASS> getImageFactory()
public Map<String,Float> classify(File file) throws ClassificationException
classify in interface ImageClassifier<IMAGE_CLASS>ClassificationExceptionpublic Map<String,Float> classify(InputStream inputStream) throws ClassificationException
classify in interface ImageClassifier<IMAGE_CLASS>ClassificationExceptionpublic MODEL_CLASS getModel()
public void setModel(MODEL_CLASS model)
public float getThreshold()
public void setThreshold(float threshold)
Copyright © 2020. All rights reserved.