Class DetectedObject
- java.lang.Object
-
- org.deeplearning4j.nn.layers.objdetect.DetectedObject
-
public class DetectedObject extends Object
-
-
Constructor Summary
Constructors Constructor Description DetectedObject(int exampleNumber, double centerX, double centerY, double width, double height, INDArray classPredictions, double confidence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getBottomRightXY()
Get the bottom right X/Y coordinates of the detected objectint
getPredictedClass()
Get the index of the predicted class (based on maximum predicted probability)double[]
getTopLeftXY()
Get the top left X/Y coordinates of the detected objectString
toString()
-
-
-
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 0centerX
- Center X position of the detected objectcenterY
- Center Y position of the detected objectwidth
- Width of the detected objectheight
- Height of the detected objectclassPredictions
- 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)
-
-