@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Label extends Object implements Serializable, Cloneable, StructuredPojo
Structure containing details about the detected label, including the name, and level of confidence.
The Amazon Rekognition Image operation operation returns a hierarchical taxonomy (Parents) for detected
labels and also bounding box information (Instances) for detected labels. Amazon Rekognition Video
doesn't return this information and returns null for the Parents and Instances
attributes.
| Constructor and Description |
|---|
Label() |
| Modifier and Type | Method and Description |
|---|---|
Label |
clone() |
boolean |
equals(Object obj) |
Float |
getConfidence()
Level of confidence.
|
List<Instance> |
getInstances()
If
Label represents an object, Instances contains the bounding boxes for each instance
of the detected object. |
String |
getName()
The name (label) of the object or scene.
|
List<Parent> |
getParents()
The parent labels for a label.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setConfidence(Float confidence)
Level of confidence.
|
void |
setInstances(Collection<Instance> instances)
If
Label represents an object, Instances contains the bounding boxes for each instance
of the detected object. |
void |
setName(String name)
The name (label) of the object or scene.
|
void |
setParents(Collection<Parent> parents)
The parent labels for a label.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Label |
withConfidence(Float confidence)
Level of confidence.
|
Label |
withInstances(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(String name)
The name (label) of the object or scene.
|
Label |
withParents(Collection<Parent> parents)
The parent labels for a label.
|
Label |
withParents(Parent... parents)
The parent labels for a label.
|
public void setName(String name)
The name (label) of the object or scene.
name - The name (label) of the object or scene.public String getName()
The name (label) of the object or scene.
public Label withName(String name)
The name (label) of the object or scene.
name - The name (label) of the object or scene.public void setConfidence(Float confidence)
Level of confidence.
confidence - Level of confidence.public Float getConfidence()
Level of confidence.
public Label withConfidence(Float confidence)
Level of confidence.
confidence - Level of confidence.public 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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
public void setInstances(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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
NOTE: This method appends the values to the existing list (if any). Use
setInstances(java.util.Collection) or withInstances(java.util.Collection) if you want to
override the existing values.
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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
public Label withInstances(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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
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.
Amazon Rekognition Video does not support bounding box information for detected labels. The value of
Instances is returned as null by GetLabelDetection.
public List<Parent> getParents()
The parent labels for a label. The response includes all ancestor labels.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
public void setParents(Collection<Parent> parents)
The parent labels for a label. The response includes all ancestor labels.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
parents - The parent labels for a label. The response includes all ancestor labels.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
public Label withParents(Parent... parents)
The parent labels for a label. The response includes all ancestor labels.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
NOTE: This method appends the values to the existing list (if any). Use
setParents(java.util.Collection) or withParents(java.util.Collection) if you want to override
the existing values.
parents - The parent labels for a label. The response includes all ancestor labels.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
public Label withParents(Collection<Parent> parents)
The parent labels for a label. The response includes all ancestor labels.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
parents - The parent labels for a label. The response includes all ancestor labels.
Amazon Rekognition Video does not support a hierarchical taxonomy of detected labels. The value of
Parents is returned as null by GetLabelDetection.
public String toString()
toString in class ObjectObject.toString()public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2018. All rights reserved.