Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
Synopsis
- data DetectAnomalies = DetectAnomalies' {
- projectName :: Text
- modelVersion :: Text
- contentType :: Text
- body :: HashedBody
- newDetectAnomalies :: Text -> Text -> Text -> HashedBody -> DetectAnomalies
- detectAnomalies_projectName :: Lens' DetectAnomalies Text
- detectAnomalies_modelVersion :: Lens' DetectAnomalies Text
- detectAnomalies_contentType :: Lens' DetectAnomalies Text
- detectAnomalies_body :: Lens' DetectAnomalies HashedBody
- data DetectAnomaliesResponse = DetectAnomaliesResponse' {}
- newDetectAnomaliesResponse :: Int -> DetectAnomaliesResponse
- detectAnomaliesResponse_detectAnomalyResult :: Lens' DetectAnomaliesResponse (Maybe DetectAnomalyResult)
- detectAnomaliesResponse_httpStatus :: Lens' DetectAnomaliesResponse Int
Creating a Request
data DetectAnomalies Source #
See: newDetectAnomalies
smart constructor.
DetectAnomalies' | |
|
Instances
:: Text | |
-> Text | |
-> Text | |
-> HashedBody | |
-> DetectAnomalies |
Create a value of DetectAnomalies
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
DetectAnomalies
, detectAnomalies_projectName
- The name of the project that contains the model version that you want to
use.
DetectAnomalies
, detectAnomalies_modelVersion
- The version of the model that you want to use.
$sel:contentType:DetectAnomalies'
, detectAnomalies_contentType
- The type of the image passed in Body
. Valid values are image/png
(PNG format images) and image/jpeg
(JPG format images).
$sel:body:DetectAnomalies'
, detectAnomalies_body
- The unencrypted image bytes that you want to analyze.
Request Lenses
detectAnomalies_projectName :: Lens' DetectAnomalies Text Source #
The name of the project that contains the model version that you want to use.
detectAnomalies_modelVersion :: Lens' DetectAnomalies Text Source #
The version of the model that you want to use.
detectAnomalies_contentType :: Lens' DetectAnomalies Text Source #
The type of the image passed in Body
. Valid values are image/png
(PNG format images) and image/jpeg
(JPG format images).
detectAnomalies_body :: Lens' DetectAnomalies HashedBody Source #
The unencrypted image bytes that you want to analyze.
Destructuring the Response
data DetectAnomaliesResponse Source #
See: newDetectAnomaliesResponse
smart constructor.
DetectAnomaliesResponse' | |
|
Instances
newDetectAnomaliesResponse Source #
Create a value of DetectAnomaliesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:detectAnomalyResult:DetectAnomaliesResponse'
, detectAnomaliesResponse_detectAnomalyResult
- The results of the DetectAnomalies
operation.
$sel:httpStatus:DetectAnomaliesResponse'
, detectAnomaliesResponse_httpStatus
- The response's http status code.
Response Lenses
detectAnomaliesResponse_detectAnomalyResult :: Lens' DetectAnomaliesResponse (Maybe DetectAnomalyResult) Source #
The results of the DetectAnomalies
operation.
detectAnomaliesResponse_httpStatus :: Lens' DetectAnomaliesResponse Int Source #
The response's http status code.