Class SingleShotDetectionAccuracy


  • 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.
    • Constructor Detail

      • SingleShotDetectionAccuracy

        public SingleShotDetectionAccuracy​(java.lang.String name)
        Creates a new instance of SingleShotDetectionAccuracy with the given name.
        Parameters:
        name - the name given to the accuracy
    • Method Detail

      • accuracyHelper

        protected ai.djl.util.Pair<java.lang.Long,​NDArray> accuracyHelper​(NDList labels,
                                                                                NDList predictions)
        A helper for classes extending AbstractAccuracy.
        Specified by:
        accuracyHelper in class AbstractAccuracy
        Parameters:
        labels - the labels to get accuracy for
        predictions - the predictions to get accuracy for
        Returns:
        a pair(number of total values, ndarray int of correct values)