Package ai.djl.modality.cv
Class MultiBoxPrior.Builder
java.lang.Object
ai.djl.modality.cv.MultiBoxPrior.Builder
- Enclosing class:
- MultiBoxPrior
The Builder to construct a
MultiBoxPrior object.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aMultiBoxPriorblock.optClip(boolean clip) Sets the boolean parameter that indicates whether to clip out-of-boundary boxes.optOffsets(List<Float> offsets) Sets the value of the center-box offsets across \(x\) and \(y\) dimensions.Sets the step across \(x\) and \(y\) dimensions.Sets the aspect ratios of the anchor boxes to be generated around each pixel.Sets the sizes of the anchor boxes to be generated around each pixel.
-
Method Details
-
setSizes
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
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
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
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
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
Builds aMultiBoxPriorblock.- Returns:
- the
MultiBoxPriorblock
-