public class SingleShotDetectionAccuracy extends AbstractAccuracy
SingleShotDetectionAccuracy
is an implementation of AbstractAccuracy
. It is used
while training a Single Shot Detection (SSD) model for object detection. It uses the targets
computed by MultiBoxTarget
, and computes the class prediction accuracy against the
computed targets.axis, correctInstances, index
totalInstances
Constructor and Description |
---|
SingleShotDetectionAccuracy(java.lang.String name)
Creates a new instance of
SingleShotDetectionAccuracy with the given name. |
Modifier and Type | Method and Description |
---|---|
protected ai.djl.util.Pair<java.lang.Long,NDArray> |
accuracyHelper(NDList labels,
NDList predictions)
A helper for classes extending
AbstractAccuracy . |
addAccumulator, evaluate, getAccumulator, resetAccumulator, updateAccumulator
checkLabelShapes, checkLabelShapes, getName
public SingleShotDetectionAccuracy(java.lang.String name)
SingleShotDetectionAccuracy
with the given name.name
- the name given to the accuracyprotected ai.djl.util.Pair<java.lang.Long,NDArray> accuracyHelper(NDList labels, NDList predictions)
AbstractAccuracy
AbstractAccuracy
.accuracyHelper
in class AbstractAccuracy
labels
- the labels to get accuracy forpredictions
- the predictions to get accuracy for