Package ai.djl.training.evaluator
Class SingleShotDetectionAccuracy
java.lang.Object
ai.djl.training.evaluator.Evaluator
ai.djl.training.evaluator.AbstractAccuracy
ai.djl.training.evaluator.SingleShotDetectionAccuracy
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.-
Field Summary
Fields inherited from class ai.djl.training.evaluator.AbstractAccuracy
axis, correctInstancesFields inherited from class ai.djl.training.evaluator.Evaluator
totalInstances -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccuracyHelper(NDList labels, NDList predictions) A helper for classes extendingAbstractAccuracy.Methods inherited from class ai.djl.training.evaluator.AbstractAccuracy
addAccumulator, evaluate, getAccumulator, resetAccumulator, updateAccumulator, updateAccumulatorsMethods inherited from class ai.djl.training.evaluator.Evaluator
checkLabelShapes, checkLabelShapes, getName
-
Constructor Details
-
SingleShotDetectionAccuracy
Creates a new instance ofSingleShotDetectionAccuracywith the given name.- Parameters:
name- the name given to the accuracy
-
-
Method Details
-
accuracyHelper
A helper for classes extendingAbstractAccuracy.- Specified by:
accuracyHelperin classAbstractAccuracy- Parameters:
labels- the labels to get accuracy forpredictions- the predictions to get accuracy for- Returns:
- a pair(number of total values, ndarray int of correct values)
-