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 Details

    • SingleShotDetectionAccuracy

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

    • accuracyHelper

      protected ai.djl.util.Pair<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)