public class DetectedObjects extends Classifications
| Modifier and Type | Class and Description |
|---|---|
static class |
DetectedObjects.DetectedObject
A
DetectedObject represents a single potential detected Object for an image. |
Classifications.ClassificationclassNames, probabilities| Constructor and Description |
|---|
DetectedObjects(java.util.List<java.lang.String> classNames,
java.util.List<java.lang.Double> probabilities,
java.util.List<BoundingBox> boundingBoxes)
Constructs a DetectedObjects, usually during post-processing.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfObjects()
Returns the number of objects found in an image.
|
<T extends Classifications.Classification> |
item(int index)
Returns the item at a given index based on the order used to construct the
Classifications. |
public DetectedObjects(java.util.List<java.lang.String> classNames,
java.util.List<java.lang.Double> probabilities,
java.util.List<BoundingBox> boundingBoxes)
All three inputs(classNames, probabilities, boundingBoxes) should be parallel lists.
classNames - the names of the objects that were detectedprobabilities - the probability of the objects that were detectedboundingBoxes - the bounding boxes of the objects that were detectedpublic <T extends Classifications.Classification> T item(int index)
Classifications.item in class ClassificationsT - the type of classification item for the taskindex - the index of the item to returnclassifications.items().get(index)public int getNumberOfObjects()