Interface DetectAnomalyResult.Builder

    • Method Detail

      • source

        DetectAnomalyResult.Builder source​(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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • isAnomalous

        DetectAnomalyResult.Builder isAnomalous​(Boolean isAnomalous)

        True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.

        Parameters:
        isAnomalous - True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • confidence

        DetectAnomalyResult.Builder confidence​(Float confidence)

        The confidence that Lookout for Vision has in the accuracy of the classification in IsAnomalous.

        Parameters:
        confidence - The confidence that Lookout for Vision has in the accuracy of the classification in IsAnomalous.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • anomalies

        DetectAnomalyResult.Builder anomalies​(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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • anomalies

        DetectAnomalyResult.Builder anomalies​(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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • anomalies

        DetectAnomalyResult.Builder anomalies​(Consumer<Anomaly.Builder>... 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.

        This is a convenience method that creates an instance of the Anomaly.Builder avoiding the need to create one manually via Anomaly.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #anomalies(List).

        Parameters:
        anomalies - a consumer that will call methods on Anomaly.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #anomalies(java.util.Collection)
      • anomalyMask

        DetectAnomalyResult.Builder anomalyMask​(SdkBytes 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.