Package ai.djl.modality.cv
Class MultiBoxPrior.Builder
- java.lang.Object
-
- ai.djl.modality.cv.MultiBoxPrior.Builder
-
- Enclosing class:
- MultiBoxPrior
public static final class MultiBoxPrior.Builder extends java.lang.Object
The Builder to construct aMultiBoxPrior
object.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiBoxPrior
build()
Builds aMultiBoxPrior
block.MultiBoxPrior.Builder
optClip(boolean clip)
Sets the boolean parameter that indicates whether to clip out-of-boundary boxes.MultiBoxPrior.Builder
optOffsets(java.util.List<java.lang.Float> offsets)
Sets the value of the center-box offsets across \(x\) and \(y\) dimensions.MultiBoxPrior.Builder
optSteps(java.util.List<java.lang.Float> steps)
Sets the step across \(x\) and \(y\) dimensions.MultiBoxPrior.Builder
setRatios(java.util.List<java.lang.Float> ratios)
Sets the aspect ratios of the anchor boxes to be generated around each pixel.MultiBoxPrior.Builder
setSizes(java.util.List<java.lang.Float> sizes)
Sets the sizes of the anchor boxes to be generated around each pixel.
-
-
-
Method Detail
-
setSizes
public MultiBoxPrior.Builder setSizes(java.util.List<java.lang.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(java.util.List<java.lang.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(java.util.List<java.lang.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(java.util.List<java.lang.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 tofalse
by default.- Parameters:
clip
- whether to clip out-of-boundary boxes- Returns:
- this
Builder
-
build
public MultiBoxPrior build()
Builds aMultiBoxPrior
block.- Returns:
- the
MultiBoxPrior
block
-
-