public class YoloV5Translator extends ObjectDetectionTranslator
| Modifier and Type | Class and Description |
|---|---|
static class |
YoloV5Translator.Builder
The builder for
YoloV5Translator. |
static class |
YoloV5Translator.YoloOutputType
A enum represents the Yolo output type.
|
ObjectDetectionTranslator.ObjectDetectionBuilder<T extends ObjectDetectionTranslator.ObjectDetectionBuilder>BaseImageTranslator.BaseBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.ClassificationBuilder<T extends BaseImageTranslator.BaseBuilder>, BaseImageTranslator.SynsetLoaderclasses, imageHeight, imageWidth, threshold| Modifier | Constructor and Description |
|---|---|
protected |
YoloV5Translator(YoloV5Translator.Builder builder)
Constructs an ImageTranslator with the provided builder.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
boxIntersection(Rectangle a,
Rectangle b) |
protected double |
boxIou(Rectangle a,
Rectangle b) |
protected double |
boxUnion(Rectangle a,
Rectangle b) |
static YoloV5Translator.Builder |
builder()
Creates a builder to build a
YoloV5Translator. |
static YoloV5Translator.Builder |
builder(java.util.Map<java.lang.String,?> arguments)
Creates a builder to build a
YoloV5Translator with specified arguments. |
protected DetectedObjects |
nms(java.util.List<ai.djl.modality.cv.translator.YoloV5Translator.IntermediateResult> list) |
protected double |
overlap(double x1,
double w1,
double x2,
double w2) |
DetectedObjects |
processOutput(TranslatorContext ctx,
NDList list)
Processes the output NDList to the corresponding output object.
|
preparegetBatchifier, getBooleanValue, getFloatValue, getIntValue, getPipeline, getStringValue, processInputprotected YoloV5Translator(YoloV5Translator.Builder builder)
builder - the data to build withpublic static YoloV5Translator.Builder builder()
YoloV5Translator.public static YoloV5Translator.Builder builder(java.util.Map<java.lang.String,?> arguments)
YoloV5Translator with specified arguments.arguments - arguments to specify builder optionsprotected DetectedObjects nms(java.util.List<ai.djl.modality.cv.translator.YoloV5Translator.IntermediateResult> list)
protected double overlap(double x1,
double w1,
double x2,
double w2)
public DetectedObjects processOutput(TranslatorContext ctx, NDList list)
ctx - the toolkit used for post-processinglist - the output NDList after inference