Class MultiBoxPrior.Builder

java.lang.Object
ai.djl.modality.cv.MultiBoxPrior.Builder
Enclosing class:
MultiBoxPrior

public static final class MultiBoxPrior.Builder extends Object
The Builder to construct a MultiBoxPrior object.
  • Method Details

    • setSizes

      public MultiBoxPrior.Builder setSizes(List<Float> sizes)
      Sets the sizes of the anchor boxes to be generated around each pixel.
      Parameters:
      sizes - the size of the anchor boxes generated around each pixel
      Returns:
      this Builder
    • setRatios

      public MultiBoxPrior.Builder setRatios(List<Float> ratios)
      Sets the aspect ratios of the anchor boxes to be generated around each pixel.
      Parameters:
      ratios - the aspect ratios of the anchor boxes to be generated around each pixel
      Returns:
      this Builder
    • optSteps

      public MultiBoxPrior.Builder optSteps(List<Float> steps)
      Sets the step across \(x\) and \(y\) dimensions. Defaults to -1 across both dimensions.
      Parameters:
      steps - the step across \(x\) and \(y\) dimensions
      Returns:
      this Builder
    • optOffsets

      public MultiBoxPrior.Builder optOffsets(List<Float> offsets)
      Sets the value of the center-box offsets across \(x\) and \(y\) dimensions. Defaults to 0.5 across both dimensions.
      Parameters:
      offsets - the value of the center-box offsets across \(x\) and \(y\) dimensions
      Returns:
      this Builder
    • optClip

      public MultiBoxPrior.Builder optClip(boolean clip)
      Sets the boolean parameter that indicates whether to clip out-of-boundary boxes. It is set to false by default.
      Parameters:
      clip - whether to clip out-of-boundary boxes
      Returns:
      this Builder
    • build

      public MultiBoxPrior build()
      Builds a MultiBoxPrior block.
      Returns:
      the MultiBoxPrior block