Class BoundingBoxError


  • public class BoundingBoxError
    extends Evaluator
    BoundingBoxError is an Evaluator that computes the error in the prediction of bounding boxes in SingleShotDetection model.
    • Constructor Summary

      Constructors 
      Constructor Description
      BoundingBoxError​(java.lang.String name)
      Creates an BoundingBoxError evaluator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAccumulator​(java.lang.String key)
      Adds an accumulator for the results of the evaluation with the given key.
      NDArray evaluate​(NDList labels, NDList predictions)
      Calculates the evaluation between the labels and the predictions.
      float getAccumulator​(java.lang.String key)
      Returns the accumulated evaluator value.
      void resetAccumulator​(java.lang.String key)
      Resets the evaluator value with the given key.
      void updateAccumulator​(java.lang.String key, NDList labels, NDList predictions)
      Updates the evaluator with the given key based on a NDList of labels and predictions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BoundingBoxError

        public BoundingBoxError​(java.lang.String name)
        Creates an BoundingBoxError evaluator.
        Parameters:
        name - the name of the evaluator
    • Method Detail

      • evaluate

        public NDArray evaluate​(NDList labels,
                                NDList predictions)
        Calculates the evaluation between the labels and the predictions.
        Specified by:
        evaluate in class Evaluator
        Parameters:
        labels - the correct values
        predictions - the predicted values
        Returns:
        the evaluation result
      • addAccumulator

        public void addAccumulator​(java.lang.String key)
        Adds an accumulator for the results of the evaluation with the given key.
        Specified by:
        addAccumulator in class Evaluator
        Parameters:
        key - the key for the new accumulator
      • updateAccumulator

        public void updateAccumulator​(java.lang.String key,
                                      NDList labels,
                                      NDList predictions)
        Updates the evaluator with the given key based on a NDList of labels and predictions.

        This is a synchronized operation. You should only call it at the end of a batch or epoch.

        Specified by:
        updateAccumulator in class Evaluator
        Parameters:
        key - the key of the accumulator to update
        labels - a NDList of labels
        predictions - a NDList of predictions
      • resetAccumulator

        public void resetAccumulator​(java.lang.String key)
        Resets the evaluator value with the given key.
        Specified by:
        resetAccumulator in class Evaluator
        Parameters:
        key - the key of the accumulator to reset
      • getAccumulator

        public float getAccumulator​(java.lang.String key)
        Returns the accumulated evaluator value.
        Specified by:
        getAccumulator in class Evaluator
        Parameters:
        key - the key of the accumulator to get
        Returns:
        the accumulated value