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.ObjectThe Builder to construct aMultiBoxPriorobject.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiBoxPriorbuild()Builds aMultiBoxPriorblock.MultiBoxPrior.BuilderoptClip(boolean clip)Sets the boolean parameter that indicates whether to clip out-of-boundary boxes.MultiBoxPrior.BuilderoptOffsets(java.util.List<java.lang.Float> offsets)Sets the value of the center-box offsets across \(x\) and \(y\) dimensions.MultiBoxPrior.BuilderoptSteps(java.util.List<java.lang.Float> steps)Sets the step across \(x\) and \(y\) dimensions.MultiBoxPrior.BuildersetRatios(java.util.List<java.lang.Float> ratios)Sets the aspect ratios of the anchor boxes to be generated around each pixel.MultiBoxPrior.BuildersetSizes(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 tofalseby default.- Parameters:
clip- whether to clip out-of-boundary boxes- Returns:
- this
Builder
-
build
public MultiBoxPrior build()
Builds aMultiBoxPriorblock.- Returns:
- the
MultiBoxPriorblock
-
-