Class YoloTranslator

All Implemented Interfaces:
PostProcessor<DetectedObjects>, PreProcessor<Image>, Translator<Image,DetectedObjects>

public class YoloTranslator extends ObjectDetectionTranslator
A translator for yolo models.
  • Constructor Details

    • YoloTranslator

      public YoloTranslator(YoloTranslator.Builder builder)
      Constructs an ImageTranslator with the provided builder.
      Parameters:
      builder - the data to build with
  • Method Details

    • processOutput

      public DetectedObjects processOutput(TranslatorContext ctx, NDList list)
      Processes the output NDList to the corresponding output object.
      Parameters:
      ctx - the toolkit used for post-processing
      list - the output NDList after inference, usually immutable in engines like PyTorch. @see Issue 1774
      Returns:
      the output object of expected type
    • builder

      public static YoloTranslator.Builder builder()
      Creates a builder to build a YoloTranslator.
      Returns:
      a new builder
    • builder

      public static YoloTranslator.Builder builder(Map<String,?> arguments)
      Creates a builder to build a YoloTranslator with specified arguments.
      Parameters:
      arguments - arguments to specify builder options
      Returns:
      a new builder