Package ai.djl.modality.cv
Class MultiBoxTarget.Builder
- java.lang.Object
-
- ai.djl.modality.cv.MultiBoxTarget.Builder
-
- Enclosing class:
- MultiBoxTarget
public static final class MultiBoxTarget.Builder extends java.lang.ObjectThe Builder to construct aMultiBoxTargetobject.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiBoxTargetbuild()Builds aMultiBoxTargetblock.MultiBoxTarget.BuilderoptIgnoreLabel(float ignoreLabel)Sets the label for ignored anchors.MultiBoxTarget.BuilderoptIouThreshold(float iouThreshold)Sets the anchor-GroundTruth overlap threshold to be regarded as a positive match.MultiBoxTarget.BuilderoptMinNegativeSamples(int minNegativeSamples)Sets the minimum number of negative samples.MultiBoxTarget.BuilderoptNegativeMinigRatio(float negativeMinigRatio)Sets the max negative to positive samples ratio.MultiBoxTarget.BuilderoptNegativeMiningThreshold(float negativeMiningThreshold)Sets the threshold used for negative mining.
-
-
-
Method Detail
-
optMinNegativeSamples
public MultiBoxTarget.Builder optMinNegativeSamples(int minNegativeSamples)
Sets the minimum number of negative samples.- Parameters:
minNegativeSamples- the minimum number of negative samples- Returns:
- this
Builder
-
optIouThreshold
public MultiBoxTarget.Builder optIouThreshold(float iouThreshold)
Sets the anchor-GroundTruth overlap threshold to be regarded as a positive match.- Parameters:
iouThreshold- the anchor-GroundTruth overlap threshold to be regarded as a positive match- Returns:
- this
Builder
-
optIgnoreLabel
public MultiBoxTarget.Builder optIgnoreLabel(float ignoreLabel)
Sets the label for ignored anchors. Defaults to -1.- Parameters:
ignoreLabel- the label for ignored anchors- Returns:
- this
Builder
-
optNegativeMiningThreshold
public MultiBoxTarget.Builder optNegativeMiningThreshold(float negativeMiningThreshold)
Sets the threshold used for negative mining.- Parameters:
negativeMiningThreshold- the threshold used for negative mining- Returns:
- this
Builder
-
optNegativeMinigRatio
public MultiBoxTarget.Builder optNegativeMinigRatio(float negativeMinigRatio)
Sets the max negative to positive samples ratio. Use -1 to disable mining. Defaults to -1.- Parameters:
negativeMinigRatio- the max negative to positive samples ratio- Returns:
- this
Builder
-
build
public MultiBoxTarget build()
Builds aMultiBoxTargetblock.- Returns:
- the
MultiBoxTargetblock
-
-