IMAGE_CLASS - class of imagesMODEL_CLASS - class of machine learning modelpublic abstract class AbstractImageClassifier<IMAGE_CLASS,MODEL_CLASS> extends Object implements Classifier<IMAGE_CLASS,String>
Classifier is String| Modifier | Constructor and Description |
|---|---|
protected |
AbstractImageClassifier(Class<IMAGE_CLASS> cls) |
|
AbstractImageClassifier(MODEL_CLASS model) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Float> |
classify(File file) |
Map<String,Float> |
classify(InputStream inStream) |
ImageFactory<IMAGE_CLASS> |
getImageFactory() |
MODEL_CLASS |
getModel() |
float |
getThreshold() |
protected void |
setModel(MODEL_CLASS model) |
void |
setThreshold(float threshold) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclassifypublic AbstractImageClassifier(MODEL_CLASS model)
protected AbstractImageClassifier(Class<IMAGE_CLASS> cls)
public ImageFactory<IMAGE_CLASS> getImageFactory()
public Map<String,Float> classify(File file) throws IOException
IOExceptionpublic Map<String,Float> classify(InputStream inStream) throws IOException
IOExceptionpublic MODEL_CLASS getModel()
protected void setModel(MODEL_CLASS model)
public float getThreshold()
public void setThreshold(float threshold)
Copyright © 2019. All rights reserved.