public abstract static class ObjectDetectionTranslator.BaseBuilder<T extends ObjectDetectionTranslator.BaseBuilder> extends BaseImageTranslator.BaseBuilder<T>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.lang.String> |
classes |
protected double |
imageHeight |
protected double |
imageWidth |
protected java.lang.String |
synsetArtifactName |
protected float |
threshold |
flag, pipeline| Constructor and Description |
|---|
BaseBuilder() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getClasses()
Get classes.
|
double |
getImageHeight()
Get resized image height.
|
double |
getImageWidth()
Get resized image width.
|
java.lang.String |
getSynsetArtifactName()
Get symset artifact name.
|
float |
getThreshold()
Get threshold.
|
T |
optRescaleSize(double imageWidth,
double imageHeight)
Sets the optional rescale size.
|
T |
optThreshold(float threshold)
Sets the threshold for prediction accuracy.
|
protected abstract T |
self() |
T |
setClasses(java.util.List<java.lang.String> classes)
Sets the class list.
|
T |
setSynsetArtifactName(java.lang.String synsetArtifactName)
Sets the name for the synset.
|
protected void |
validate() |
optFlag, setPipelineprotected float threshold
protected java.lang.String synsetArtifactName
protected java.util.List<java.lang.String> classes
protected double imageWidth
protected double imageHeight
protected abstract T self()
self in class BaseImageTranslator.BaseBuilder<T extends ObjectDetectionTranslator.BaseBuilder>protected void validate()
public T optThreshold(float threshold)
Predictions below the threshold will be dropped.
threshold - the threshold for the prediction accuracypublic T setSynsetArtifactName(java.lang.String synsetArtifactName)
Synset is used to convert the prediction classes to their actual names.
Set either the synset or the classes.
synsetArtifactName - the name of synsetpublic T setClasses(java.util.List<java.lang.String> classes)
Set either the synset or the classes.
classes - the list of classespublic T optRescaleSize(double imageWidth, double imageHeight)
imageWidth - the width to rescale images toimageHeight - the height to rescale images topublic float getThreshold()
public java.lang.String getSynsetArtifactName()
public java.util.List<java.lang.String> getClasses()
public double getImageWidth()
public double getImageHeight()