public class DetectedObject extends Object
Yolo2OutputLayer, the dimensions are grid cell units - for example, with 416x416 input,
32x downsampling, we have 13x13 grid cells (each corresponding to 32 pixels in the input image). Thus, a centerX
of 5.5 would be xPixels=5.5x32 = 176 pixels from left. Widths and heights are similar: in this example, a with of 13
would be the entire image (416 pixels), and a height of 6.5 would be 6.5/13 = 0.5 of the image (208 pixels).| Constructor and Description |
|---|
DetectedObject(int exampleNumber,
double centerX,
double centerY,
double width,
double height,
org.nd4j.linalg.api.ndarray.INDArray classPredictions,
double confidence) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getBottomRightXY()
Get the bottom right X/Y coordinates of the detected object
|
int |
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 object
|
String |
toString() |
public DetectedObject(int exampleNumber,
double centerX,
double centerY,
double width,
double height,
org.nd4j.linalg.api.ndarray.INDArray classPredictions,
double confidence)
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 objectpublic double[] getTopLeftXY()
public double[] getBottomRightXY()
public int getPredictedClass()
Copyright © 2018. All rights reserved.