Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Detects Personal Protective Equipment (PPE) worn by people detected in an image. Amazon Rekognition can detect the following types of PPE.
- Face cover
- Hand cover
- Head cover
You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. The image must be either a PNG or JPG formatted file.
DetectProtectiveEquipment
detects PPE worn by up to 15 persons
detected in an image.
For each person detected in the image the API returns an array of body parts (face, head, left-hand, right-hand). For each body part, an array of detected items of PPE is returned, including an indicator of whether or not the PPE covers the body part. The API returns the confidence it has in each detection (person, PPE, body part and body part coverage). It also returns a bounding box (BoundingBox) for each detected person and each detected item of PPE.
You can optionally request a summary of detected PPE items with the
SummarizationAttributes
input parameter. The summary provides the
following information.
- The persons detected as wearing all of the types of PPE that you specify.
- The persons detected as not wearing all of the types PPE that you specify.
- The persons detected where PPE adornment could not be determined.
This is a stateless API operation. That is, the operation does not persist any data.
This operation requires permissions to perform the
rekognition:DetectProtectiveEquipment
action.
Synopsis
- data DetectProtectiveEquipment = DetectProtectiveEquipment' {}
- newDetectProtectiveEquipment :: Image -> DetectProtectiveEquipment
- detectProtectiveEquipment_summarizationAttributes :: Lens' DetectProtectiveEquipment (Maybe ProtectiveEquipmentSummarizationAttributes)
- detectProtectiveEquipment_image :: Lens' DetectProtectiveEquipment Image
- data DetectProtectiveEquipmentResponse = DetectProtectiveEquipmentResponse' {}
- newDetectProtectiveEquipmentResponse :: Int -> DetectProtectiveEquipmentResponse
- detectProtectiveEquipmentResponse_summary :: Lens' DetectProtectiveEquipmentResponse (Maybe ProtectiveEquipmentSummary)
- detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion :: Lens' DetectProtectiveEquipmentResponse (Maybe Text)
- detectProtectiveEquipmentResponse_persons :: Lens' DetectProtectiveEquipmentResponse (Maybe [ProtectiveEquipmentPerson])
- detectProtectiveEquipmentResponse_httpStatus :: Lens' DetectProtectiveEquipmentResponse Int
Creating a Request
data DetectProtectiveEquipment Source #
See: newDetectProtectiveEquipment
smart constructor.
DetectProtectiveEquipment' | |
|
Instances
newDetectProtectiveEquipment Source #
Create a value of DetectProtectiveEquipment
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:summarizationAttributes:DetectProtectiveEquipment'
, detectProtectiveEquipment_summarizationAttributes
- An array of PPE types that you want to summarize.
$sel:image:DetectProtectiveEquipment'
, detectProtectiveEquipment_image
- The image in which you want to detect PPE on detected persons. The image
can be passed as image bytes or you can reference an image stored in an
Amazon S3 bucket.
Request Lenses
detectProtectiveEquipment_summarizationAttributes :: Lens' DetectProtectiveEquipment (Maybe ProtectiveEquipmentSummarizationAttributes) Source #
An array of PPE types that you want to summarize.
detectProtectiveEquipment_image :: Lens' DetectProtectiveEquipment Image Source #
The image in which you want to detect PPE on detected persons. The image can be passed as image bytes or you can reference an image stored in an Amazon S3 bucket.
Destructuring the Response
data DetectProtectiveEquipmentResponse Source #
See: newDetectProtectiveEquipmentResponse
smart constructor.
DetectProtectiveEquipmentResponse' | |
|
Instances
newDetectProtectiveEquipmentResponse Source #
Create a value of DetectProtectiveEquipmentResponse
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:summary:DetectProtectiveEquipmentResponse'
, detectProtectiveEquipmentResponse_summary
- Summary information for the types of PPE specified in the
SummarizationAttributes
input parameter.
$sel:protectiveEquipmentModelVersion:DetectProtectiveEquipmentResponse'
, detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion
- The version number of the PPE detection model used to detect PPE in the
image.
$sel:persons:DetectProtectiveEquipmentResponse'
, detectProtectiveEquipmentResponse_persons
- An array of persons detected in the image (including persons not wearing
PPE).
$sel:httpStatus:DetectProtectiveEquipmentResponse'
, detectProtectiveEquipmentResponse_httpStatus
- The response's http status code.
Response Lenses
detectProtectiveEquipmentResponse_summary :: Lens' DetectProtectiveEquipmentResponse (Maybe ProtectiveEquipmentSummary) Source #
Summary information for the types of PPE specified in the
SummarizationAttributes
input parameter.
detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion :: Lens' DetectProtectiveEquipmentResponse (Maybe Text) Source #
The version number of the PPE detection model used to detect PPE in the image.
detectProtectiveEquipmentResponse_persons :: Lens' DetectProtectiveEquipmentResponse (Maybe [ProtectiveEquipmentPerson]) Source #
An array of persons detected in the image (including persons not wearing PPE).
detectProtectiveEquipmentResponse_httpStatus :: Lens' DetectProtectiveEquipmentResponse Int Source #
The response's http status code.