Package ai.djl.modality.cv.translator
Class YoloWorldTranslator.Builder
java.lang.Object
ai.djl.modality.cv.translator.BaseImageTranslator.BaseBuilder<YoloWorldTranslator.Builder>
ai.djl.modality.cv.translator.YoloWorldTranslator.Builder
- Enclosing class:
- YoloWorldTranslator
public static class YoloWorldTranslator.Builder
extends BaseImageTranslator.BaseBuilder<YoloWorldTranslator.Builder>
The builder for
YoloWorldTranslator.-
Field Summary
Fields inherited from class ai.djl.modality.cv.translator.BaseImageTranslator.BaseBuilder
batchifier, flag, height, pipeline, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the translator.protected voidconfigPostProcess(Map<String, ?> arguments) optClipModelPath(String clipModelPath) Sets the clip model file path, default value "clip.pt".optNmsThreshold(float nmsThreshold) Sets the NMS threshold.optThreshold(float threshold) Sets the threshold for prediction accuracy.protected YoloWorldTranslator.Builderself()Methods inherited from class ai.djl.modality.cv.translator.BaseImageTranslator.BaseBuilder
addTransform, configPreProcess, optBatchifier, optFlag, setImageSize, setPipeline, validate
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
self
- Specified by:
selfin classBaseImageTranslator.BaseBuilder<YoloWorldTranslator.Builder>
-
optThreshold
Sets the threshold for prediction accuracy.Predictions below the threshold will be dropped.
- Parameters:
threshold- the threshold for prediction accuracy- Returns:
- the builder
-
optNmsThreshold
Sets the NMS threshold.- Parameters:
nmsThreshold- the NMS threshold- Returns:
- this builder
-
optClipModelPath
Sets the clip model file path, default value "clip.pt".- Parameters:
clipModelPath- the clip model file path- Returns:
- this builder
-
configPostProcess
- Overrides:
configPostProcessin classBaseImageTranslator.BaseBuilder<YoloWorldTranslator.Builder>
-
build
Builds the translator.- Returns:
- the new translator
-