Package ai.djl.modality.cv.translator
Class YoloSegmentationTranslator
java.lang.Object
ai.djl.modality.cv.translator.BaseImageTranslator<DetectedObjects>
ai.djl.modality.cv.translator.ObjectDetectionTranslator
ai.djl.modality.cv.translator.YoloV5Translator
ai.djl.modality.cv.translator.YoloSegmentationTranslator
- All Implemented Interfaces:
PostProcessor<DetectedObjects>
,PreProcessor<Image>
,Translator<Image,
DetectedObjects>
A translator for Yolov8 instance segmentation models.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The builder for instance segmentation translator.Nested classes/interfaces inherited from class ai.djl.modality.cv.translator.YoloV5Translator
YoloV5Translator.YoloOutputType
Nested classes/interfaces inherited from class ai.djl.modality.cv.translator.ObjectDetectionTranslator
ObjectDetectionTranslator.ObjectDetectionBuilder<T extends ObjectDetectionTranslator.ObjectDetectionBuilder>
Nested classes/interfaces inherited from class ai.djl.modality.cv.translator.BaseImageTranslator
BaseImageTranslator.BaseBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.ClassificationBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.SynsetLoader
-
Field Summary
Fields inherited from class ai.djl.modality.cv.translator.ObjectDetectionTranslator
applyRatio, classes, removePadding
Fields inherited from class ai.djl.modality.cv.translator.BaseImageTranslator
height, pipeline, width
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the instance segmentation translator from the given builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder to build aYoloSegmentationTranslator
.Creates a builder to build aYoloSegmentationTranslator
with specified arguments.processOutput
(TranslatorContext ctx, NDList list) Processes the output NDList to the corresponding output object.Methods inherited from class ai.djl.modality.cv.translator.YoloV5Translator
nms, processFromBoxOutput
Methods inherited from class ai.djl.modality.cv.translator.ObjectDetectionTranslator
prepare
Methods inherited from class ai.djl.modality.cv.translator.BaseImageTranslator
getBatchifier, processInput
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ai.djl.translate.Translator
batchProcessInput, batchProcessOutput, getExpansions
-
Constructor Details
-
YoloSegmentationTranslator
Creates the instance segmentation translator from the given builder.- Parameters:
builder
- the builder for the translator
-
-
Method Details
-
processOutput
Processes the output NDList to the corresponding output object.- Specified by:
processOutput
in interfacePostProcessor<DetectedObjects>
- Overrides:
processOutput
in classYoloV5Translator
- Parameters:
ctx
- the toolkit used for post-processinglist
- the output NDList after inference, usually immutable in engines like PyTorch. @see Issue 1774- Returns:
- the output object of expected type
-
builder
Creates a builder to build aYoloSegmentationTranslator
.- Returns:
- a new builder
-
builder
Creates a builder to build aYoloSegmentationTranslator
with specified arguments.- Parameters:
arguments
- arguments to specify builder options- Returns:
- a new builder
-