Class DetectedObject


  • public class DetectedObject
    extends Object
    • Constructor Detail

      • DetectedObject

        public DetectedObject​(int exampleNumber,
                              double centerX,
                              double centerY,
                              double width,
                              double height,
                              INDArray classPredictions,
                              double confidence)
        Parameters:
        exampleNumber - Index of the example in the current minibatch. For single images, this is always 0
        centerX - Center X position of the detected object
        centerY - Center Y position of the detected object
        width - Width of the detected object
        height - Height of the detected object
        classPredictions - Row vector of class probabilities for the detected object
    • Method Detail

      • getTopLeftXY

        public double[] getTopLeftXY()
        Get the top left X/Y coordinates of the detected object
        Returns:
        Array of length 2 - top left X and Y
      • getBottomRightXY

        public double[] getBottomRightXY()
        Get the bottom right X/Y coordinates of the detected object
        Returns:
        Array of length 2 - bottom right X and Y
      • getPredictedClass

        public int getPredictedClass()
        Get the index of the predicted class (based on maximum predicted probability)
        Returns:
        Index of the predicted class (0 to nClasses - 1)