@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class DetectAnomalyResult extends Object implements Serializable, Cloneable, StructuredPojo
The prediction results from a call to DetectAnomalies. DetectAnomalyResult
includes
classification information for the prediction (IsAnomalous
and Confidence
). If the model
you use is an image segementation model, DetectAnomalyResult
also includes segmentation information (
Anomalies
and AnomalyMask
). Classification information is calculated separately from
segmentation information and you shouldn't assume a relationship between them.
Constructor and Description |
---|
DetectAnomalyResult() |
Modifier and Type | Method and Description |
---|---|
DetectAnomalyResult |
clone() |
boolean |
equals(Object obj) |
List<Anomaly> |
getAnomalies()
If the model is an image segmentation model,
Anomalies contains a list of anomaly types found in the
image. |
ByteBuffer |
getAnomalyMask()
If the model is an image segmentation model,
AnomalyMask contains pixel masks that covers all
anomaly types found on the image. |
Float |
getConfidence()
The confidence that Lookout for Vision has in the accuracy of the classification in
IsAnomalous . |
Boolean |
getIsAnomalous()
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
|
ImageSource |
getSource()
The source of the image that was analyzed.
|
int |
hashCode() |
Boolean |
isAnomalous()
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAnomalies(Collection<Anomaly> anomalies)
If the model is an image segmentation model,
Anomalies contains a list of anomaly types found in the
image. |
void |
setAnomalyMask(ByteBuffer anomalyMask)
If the model is an image segmentation model,
AnomalyMask contains pixel masks that covers all
anomaly types found on the image. |
void |
setConfidence(Float confidence)
The confidence that Lookout for Vision has in the accuracy of the classification in
IsAnomalous . |
void |
setIsAnomalous(Boolean isAnomalous)
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
|
void |
setSource(ImageSource source)
The source of the image that was analyzed.
|
String |
toString()
Returns a string representation of this object.
|
DetectAnomalyResult |
withAnomalies(Anomaly... anomalies)
If the model is an image segmentation model,
Anomalies contains a list of anomaly types found in the
image. |
DetectAnomalyResult |
withAnomalies(Collection<Anomaly> anomalies)
If the model is an image segmentation model,
Anomalies contains a list of anomaly types found in the
image. |
DetectAnomalyResult |
withAnomalyMask(ByteBuffer anomalyMask)
If the model is an image segmentation model,
AnomalyMask contains pixel masks that covers all
anomaly types found on the image. |
DetectAnomalyResult |
withConfidence(Float confidence)
The confidence that Lookout for Vision has in the accuracy of the classification in
IsAnomalous . |
DetectAnomalyResult |
withIsAnomalous(Boolean isAnomalous)
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
|
DetectAnomalyResult |
withSource(ImageSource source)
The source of the image that was analyzed.
|
public void setSource(ImageSource source)
The source of the image that was analyzed. direct
means that the images was supplied from the local
computer. No other values are supported.
source
- The source of the image that was analyzed. direct
means that the images was supplied from the
local computer. No other values are supported.public ImageSource getSource()
The source of the image that was analyzed. direct
means that the images was supplied from the local
computer. No other values are supported.
direct
means that the images was supplied from
the local computer. No other values are supported.public DetectAnomalyResult withSource(ImageSource source)
The source of the image that was analyzed. direct
means that the images was supplied from the local
computer. No other values are supported.
source
- The source of the image that was analyzed. direct
means that the images was supplied from the
local computer. No other values are supported.public void setIsAnomalous(Boolean isAnomalous)
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
isAnomalous
- True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.public Boolean getIsAnomalous()
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
public DetectAnomalyResult withIsAnomalous(Boolean isAnomalous)
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
isAnomalous
- True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.public Boolean isAnomalous()
True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
public void setConfidence(Float confidence)
The confidence that Lookout for Vision has in the accuracy of the classification in IsAnomalous
.
confidence
- The confidence that Lookout for Vision has in the accuracy of the classification in
IsAnomalous
.public Float getConfidence()
The confidence that Lookout for Vision has in the accuracy of the classification in IsAnomalous
.
IsAnomalous
.public DetectAnomalyResult withConfidence(Float confidence)
The confidence that Lookout for Vision has in the accuracy of the classification in IsAnomalous
.
confidence
- The confidence that Lookout for Vision has in the accuracy of the classification in
IsAnomalous
.public List<Anomaly> getAnomalies()
If the model is an image segmentation model, Anomalies
contains a list of anomaly types found in the
image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly type exist on
the image). The first element in the list is always an anomaly type representing the image background
('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically add the background
anomaly type to the response, and you don't need to declare a background anomaly type in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
Anomalies
contains a list of anomaly types
found in the image. There is one entry for each type of anomaly found (even if multiple instances of an
anomaly type exist on the image). The first element in the list is always an anomaly type representing
the image background ('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision
automatically add the background anomaly type to the response, and you don't need to declare a background
anomaly type in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
public void setAnomalies(Collection<Anomaly> anomalies)
If the model is an image segmentation model, Anomalies
contains a list of anomaly types found in the
image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly type exist on
the image). The first element in the list is always an anomaly type representing the image background
('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically add the background
anomaly type to the response, and you don't need to declare a background anomaly type in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
anomalies
- If the model is an image segmentation model, Anomalies
contains a list of anomaly types found
in the image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly
type exist on the image). The first element in the list is always an anomaly type representing the image
background ('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically
add the background anomaly type to the response, and you don't need to declare a background anomaly type
in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
public DetectAnomalyResult withAnomalies(Anomaly... anomalies)
If the model is an image segmentation model, Anomalies
contains a list of anomaly types found in the
image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly type exist on
the image). The first element in the list is always an anomaly type representing the image background
('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically add the background
anomaly type to the response, and you don't need to declare a background anomaly type in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
NOTE: This method appends the values to the existing list (if any). Use
setAnomalies(java.util.Collection)
or withAnomalies(java.util.Collection)
if you want to
override the existing values.
anomalies
- If the model is an image segmentation model, Anomalies
contains a list of anomaly types found
in the image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly
type exist on the image). The first element in the list is always an anomaly type representing the image
background ('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically
add the background anomaly type to the response, and you don't need to declare a background anomaly type
in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
public DetectAnomalyResult withAnomalies(Collection<Anomaly> anomalies)
If the model is an image segmentation model, Anomalies
contains a list of anomaly types found in the
image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly type exist on
the image). The first element in the list is always an anomaly type representing the image background
('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically add the background
anomaly type to the response, and you don't need to declare a background anomaly type in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
anomalies
- If the model is an image segmentation model, Anomalies
contains a list of anomaly types found
in the image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly
type exist on the image). The first element in the list is always an anomaly type representing the image
background ('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically
add the background anomaly type to the response, and you don't need to declare a background anomaly type
in your dataset.
If the list has one entry ('background'), no anomalies were found on the image.
An image classification model doesn't return an Anomalies
list.
public void setAnomalyMask(ByteBuffer anomalyMask)
If the model is an image segmentation model, AnomalyMask
contains pixel masks that covers all
anomaly types found on the image. Each anomaly type has a different mask color. To map a color to an anomaly
type, see the color
field of the PixelAnomaly object.
An image classification model doesn't return an Anomalies
list.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
anomalyMask
- If the model is an image segmentation model, AnomalyMask
contains pixel masks that covers all
anomaly types found on the image. Each anomaly type has a different mask color. To map a color to an
anomaly type, see the color
field of the PixelAnomaly object.
An image classification model doesn't return an Anomalies
list.
public ByteBuffer getAnomalyMask()
If the model is an image segmentation model, AnomalyMask
contains pixel masks that covers all
anomaly types found on the image. Each anomaly type has a different mask color. To map a color to an anomaly
type, see the color
field of the PixelAnomaly object.
An image classification model doesn't return an Anomalies
list.
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
AnomalyMask
contains pixel masks that covers
all anomaly types found on the image. Each anomaly type has a different mask color. To map a color to an
anomaly type, see the color
field of the PixelAnomaly object.
An image classification model doesn't return an Anomalies
list.
public DetectAnomalyResult withAnomalyMask(ByteBuffer anomalyMask)
If the model is an image segmentation model, AnomalyMask
contains pixel masks that covers all
anomaly types found on the image. Each anomaly type has a different mask color. To map a color to an anomaly
type, see the color
field of the PixelAnomaly object.
An image classification model doesn't return an Anomalies
list.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
anomalyMask
- If the model is an image segmentation model, AnomalyMask
contains pixel masks that covers all
anomaly types found on the image. Each anomaly type has a different mask color. To map a color to an
anomaly type, see the color
field of the PixelAnomaly object.
An image classification model doesn't return an Anomalies
list.
public String toString()
toString
in class Object
Object.toString()
public DetectAnomalyResult clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.