Skip to content

/AWS1/CL_LOV=>DETECTANOMALIES()

About DetectAnomalies

Detects anomalies in an image that you supply.

The response from DetectAnomalies includes a boolean prediction that the image contains one or more anomalies and a confidence value for the prediction. If the model is an image segmentation model, the response also includes segmentation information for each type of anomaly found in the image.

Before calling DetectAnomalies, you must first start your model with the StartModel operation. You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your model uses. If you are not using a model, use the StopModel operation to stop your model.

For more information, see Detecting anomalies in an image in the Amazon Lookout for Vision developer guide.

This operation requires permissions to perform the lookoutvision:DetectAnomalies operation.

Method Signature

IMPORTING

Required arguments:

IV_PROJECTNAME TYPE /AWS1/LOVPROJECTNAME /AWS1/LOVPROJECTNAME

The name of the project that contains the model version that you want to use.

IV_MODELVERSION TYPE /AWS1/LOVMODELVERSION /AWS1/LOVMODELVERSION

The version of the model that you want to use.

IV_BODY TYPE /AWS1/LOVSTREAM /AWS1/LOVSTREAM

The unencrypted image bytes that you want to analyze.

IV_CONTENTTYPE TYPE /AWS1/LOVCONTENTTYPE /AWS1/LOVCONTENTTYPE

The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_LOVDETECTANOMALIESRSP /AWS1/CL_LOVDETECTANOMALIESRSP