public class Label
extends java.lang.Object
implements java.io.Serializable
Structure containing details about the detected label, including the name, detected instances, parent labels, and level of confidence.
| Constructor and Description |
|---|
Label() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Float |
getConfidence()
Level of confidence.
|
java.util.List<Instance> |
getInstances()
If
Label represents an object, Instances
contains the bounding boxes for each instance of the detected object. |
java.lang.String |
getName()
The name (label) of the object or scene.
|
java.util.List<Parent> |
getParents()
The parent labels for a label.
|
int |
hashCode() |
void |
setConfidence(java.lang.Float confidence)
Level of confidence.
|
void |
setInstances(java.util.Collection<Instance> instances)
If
Label represents an object, Instances
contains the bounding boxes for each instance of the detected object. |
void |
setName(java.lang.String name)
The name (label) of the object or scene.
|
void |
setParents(java.util.Collection<Parent> parents)
The parent labels for a label.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Label |
withConfidence(java.lang.Float confidence)
Level of confidence.
|
Label |
withInstances(java.util.Collection<Instance> instances)
If
Label represents an object, Instances
contains the bounding boxes for each instance of the detected object. |
Label |
withInstances(Instance... instances)
If
Label represents an object, Instances
contains the bounding boxes for each instance of the detected object. |
Label |
withName(java.lang.String name)
The name (label) of the object or scene.
|
Label |
withParents(java.util.Collection<Parent> parents)
The parent labels for a label.
|
Label |
withParents(Parent... parents)
The parent labels for a label.
|
public java.lang.String getName()
The name (label) of the object or scene.
The name (label) of the object or scene.
public void setName(java.lang.String name)
The name (label) of the object or scene.
name - The name (label) of the object or scene.
public Label withName(java.lang.String name)
The name (label) of the object or scene.
Returns a reference to this object so that method calls can be chained together.
name - The name (label) of the object or scene.
public java.lang.Float getConfidence()
Level of confidence.
Constraints:
Length: 0 - 100
Level of confidence.
public void setConfidence(java.lang.Float confidence)
Level of confidence.
Constraints:
Length: 0 - 100
confidence - Level of confidence.
public Label withConfidence(java.lang.Float confidence)
Level of confidence.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 100
confidence - Level of confidence.
public java.util.List<Instance> getInstances()
If Label represents an object, Instances
contains the bounding boxes for each instance of the detected object.
Bounding boxes are returned for common object labels such as people,
cars, furniture, apparel or pets.
If Label represents an object,
Instances contains the bounding boxes for each
instance of the detected object. Bounding boxes are returned for
common object labels such as people, cars, furniture, apparel or
pets.
public void setInstances(java.util.Collection<Instance> instances)
If Label represents an object, Instances
contains the bounding boxes for each instance of the detected object.
Bounding boxes are returned for common object labels such as people,
cars, furniture, apparel or pets.
instances -
If Label represents an object,
Instances contains the bounding boxes for each
instance of the detected object. Bounding boxes are returned
for common object labels such as people, cars, furniture,
apparel or pets.
public Label withInstances(Instance... instances)
If Label represents an object, Instances
contains the bounding boxes for each instance of the detected object.
Bounding boxes are returned for common object labels such as people,
cars, furniture, apparel or pets.
Returns a reference to this object so that method calls can be chained together.
instances -
If Label represents an object,
Instances contains the bounding boxes for each
instance of the detected object. Bounding boxes are returned
for common object labels such as people, cars, furniture,
apparel or pets.
public Label withInstances(java.util.Collection<Instance> instances)
If Label represents an object, Instances
contains the bounding boxes for each instance of the detected object.
Bounding boxes are returned for common object labels such as people,
cars, furniture, apparel or pets.
Returns a reference to this object so that method calls can be chained together.
instances -
If Label represents an object,
Instances contains the bounding boxes for each
instance of the detected object. Bounding boxes are returned
for common object labels such as people, cars, furniture,
apparel or pets.
public java.util.List<Parent> getParents()
The parent labels for a label. The response includes all ancestor labels.
The parent labels for a label. The response includes all ancestor labels.
public void setParents(java.util.Collection<Parent> parents)
The parent labels for a label. The response includes all ancestor labels.
parents - The parent labels for a label. The response includes all ancestor labels.
public Label withParents(Parent... parents)
The parent labels for a label. The response includes all ancestor labels.
Returns a reference to this object so that method calls can be chained together.
parents - The parent labels for a label. The response includes all ancestor labels.
public Label withParents(java.util.Collection<Parent> parents)
The parent labels for a label. The response includes all ancestor labels.
Returns a reference to this object so that method calls can be chained together.
parents - The parent labels for a label. The response includes all ancestor labels.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.