public static class SingleShotDetectionTranslator.Builder extends ImageTranslator.BaseBuilder<SingleShotDetectionTranslator.Builder>
flag, pipeline
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SingleShotDetectionTranslator |
build()
Builds the translator.
|
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.
|
SingleShotDetectionTranslator.Builder |
optRescaleSize(double imageWidth,
double imageHeight)
Sets the optional rescale size.
|
SingleShotDetectionTranslator.Builder |
optThreshold(float threshold)
Sets the threshold for prediction accuracy.
|
protected SingleShotDetectionTranslator.Builder |
self() |
SingleShotDetectionTranslator.Builder |
setClasses(java.util.List<java.lang.String> classes)
Sets the class list.
|
SingleShotDetectionTranslator.Builder |
setSynsetArtifactName(java.lang.String synsetArtifactName)
Sets the name for the synset.
|
optFlag, setPipeline
public SingleShotDetectionTranslator.Builder optThreshold(float threshold)
Predictions below the threshold will be dropped.
threshold
- the threshold for the prediction accuracypublic SingleShotDetectionTranslator.Builder 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 SingleShotDetectionTranslator.Builder setClasses(java.util.List<java.lang.String> classes)
Set either the synset or the classes.
classes
- the list of classespublic SingleShotDetectionTranslator.Builder optRescaleSize(double imageWidth, double imageHeight)
imageWidth
- the width to rescale images toimageHeight
- the height to rescale images toprotected SingleShotDetectionTranslator.Builder self()
self
in class ImageTranslator.BaseBuilder<SingleShotDetectionTranslator.Builder>
public SingleShotDetectionTranslator build()
public float getThreshold()
public java.lang.String getSynsetArtifactName()
public java.util.List<java.lang.String> getClasses()
public double getImageWidth()
public double getImageHeight()