fn index_faces(
        &self,
        input: IndexFacesRequest,
    ) -> RusotoFuture<IndexFacesResponse, IndexFacesError> {
        let mut request = SignedRequest::new("POST", "rekognition", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "RekognitionService.IndexFaces");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        self.client.sign_and_dispatch(request, |response| {
            if response.status.is_success() {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;

                    if body.is_empty() || body == b"null" {
                        body = b"{}".to_vec();
                    }

                    serde_json::from_str::<IndexFacesResponse>(
                        String::from_utf8_lossy(body.as_ref()).as_ref(),
                    )
                    .unwrap()
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(IndexFacesError::from_response(response))),
                )
            }
        })
    }
/// <p>Detects faces in the input image and adds them to the specified collection. </p> <p>Amazon Rekognition does not save the actual faces detected. Instead, the underlying detection algorithm first detects the faces in the input image, and for each face extracts facial features into a feature vector, and stores it in the back-end database. Amazon Rekognition uses feature vectors when performing face match and search operations using the and operations.</p> <p>If you are using version 1.0 of the face detection model, <code>IndexFaces</code> indexes the 15 largest faces in the input image. Later versions of the face detection model index the 100 largest faces in the input image. To determine which version of the model you are using, check the the value of <code>FaceModelVersion</code> in the response from <code>IndexFaces</code>. </p> <p>For more information, see Model Versioning in the Amazon Rekognition Developer Guide.</p> <p>If you provide the optional <code>ExternalImageID</code> for the input image you provided, Amazon Rekognition associates this ID with all faces that it detects. When you call the operation, the response returns the external ID. You can use this external image ID to create a client-side index to associate the faces with each image. You can then use the index to find all faces in an image. </p> <p>In response, the operation returns an array of metadata for all detected faces. This includes, the bounding box of the detected face, confidence value (indicating the bounding box contains a face), a face ID assigned by the service for each face that is detected and stored, and an image ID assigned by the service for the input image. If you request all facial attributes (using the <code>detectionAttributes</code> parameter, Amazon Rekognition returns detailed facial attributes such as facial landmarks (for example, location of eye and mount) and other facial attributes such gender. If you provide the same image, specify the same collection, and use the same external ID in the <code>IndexFaces</code> operation, Amazon Rekognition doesn't save duplicate face metadata.</p> <p>For more information, see Adding Faces to a Collection in the Amazon Rekognition Developer Guide.</p> <p>The input image is passed either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the Amazon CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. </p> <p>This operation requires permissions to perform the <code>rekognition:IndexFaces</code> action.</p>
Detects faces in the input image and adds them to the specified collection.  Amazon Rekognition does not save the actual faces detected. Instead, the underlying detection algorithm first detects the faces in the input image, and for each face extracts facial features into a feature vector, and stores it in the back-end database. Amazon Rekognition uses feature vectors when performing face match and search operations using the and operations. If you are using version 1.0 of the face detection model, IndexFaces indexes the 15 largest faces in the input image. Later versions of the face detection model index the 100 largest faces in the input image. To determine which version of the model you are using, check the the value of FaceModelVersion in the response from IndexFaces.  For more information, see Model Versioning in the Amazon Rekognition Developer Guide. If you provide the optional ExternalImageID for the input image you provided, Amazon Rekognition associates this ID with all faces that it detects. When you call the operation, the response returns the external ID. You can use this external image ID to create a client-side index to associate the faces with each image. You can then use the index to find all faces in an image.  In response, the operation returns an array of metadata for all detected faces. This includes, the bounding box of the detected face, confidence value (indicating the bounding box contains a face), a face ID assigned by the service for each face that is detected and stored, and an image ID assigned by the service for the input image. If you request all facial attributes (using the detectionAttributes parameter, Amazon Rekognition returns detailed facial attributes such as facial landmarks (for example, location of eye and mount) and other facial attributes such gender. If you provide the same image, specify the same collection, and use the same external ID in the IndexFaces operation, Amazon Rekognition doesn't save duplicate face metadata. For more information, see Adding Faces to a Collection in the Amazon Rekognition Developer Guide. The input image is passed either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the Amazon CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.  This operation requires permissions to perform the rekognition:IndexFaces action.
Detects faces in the input image and adds them to the specified collection . Amazon Rekognition does not save the actual faces detected . Instead the underlying detection algorithm first detects the faces in the input image and for each face extracts facial features into a feature vector and stores it in the back - end database . Amazon Rekognition uses feature vectors when performing face match and search operations using the and operations . If you are using version 1 . 0 of the face detection model IndexFaces indexes the 15 largest faces in the input image . Later versions of the face detection model index the 100 largest faces in the input image . To determine which version of the model you are using check the the value of FaceModelVersion in the response from IndexFaces . For more information see Model Versioning in the Amazon Rekognition Developer Guide . If you provide the optional ExternalImageID for the input image you provided Amazon Rekognition associates this ID with all faces that it detects . When you call the operation the response returns the external ID . You can use this external image ID to create a client - side index to associate the faces with each image . You can then use the index to find all faces in an image . In response the operation returns an array of metadata for all detected faces . This includes the bounding box of the detected face confidence value ( indicating the bounding box contains a face ) a face ID assigned by the service for each face that is detected and stored and an image ID assigned by the service for the input image . If you request all facial attributes ( using the detectionAttributes parameter Amazon Rekognition returns detailed facial attributes such as facial landmarks ( for example location of eye and mount ) and other facial attributes such gender . If you provide the same image specify the same collection and use the same external ID in the IndexFaces operation Amazon Rekognition doesn ' t save duplicate face metadata . For more information see Adding Faces to a Collection in the Amazon Rekognition Developer Guide . The input image is passed either as base64 - encoded image bytes or as a reference to an image in an Amazon S3 bucket . If you use the Amazon CLI to call Amazon Rekognition operations passing image bytes is not supported . The image must be either a PNG or JPEG formatted file . This operation requires permissions to perform the rekognition : IndexFaces action .
fn index_faces(
        &self,
        input: IndexFacesRequest,
    ) -> RusotoFuture<IndexFacesResponse, IndexFacesError> {
        let mut request = SignedRequest::new("POST", "rekognition", &self.region, "/");
        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "RekognitionService.IndexFaces");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));
        self.client.sign_and_dispatch(request, |response| {
            if response.status.is_success() {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;
                    if body.is_empty() || body == b"null" {
                        body = b"{}".to_vec();
                    }
                    serde_json::from_str::<IndexFacesResponse>(
                        String::from_utf8_lossy(body.as_ref()).as_ref(),
                    )
                    .unwrap()
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(IndexFacesError::from_response(response))),
                )
            }
        })
    }
fn index_faces ( & self , input : IndexFacesRequest , ) -> RusotoFuture < IndexFacesResponse , IndexFacesError > { let mut request = SignedRequest :: new ( " " , " " , & self . region , " " ) ; request . set_content_type ( " " . to_owned ( ) ) ; request . add_header ( " " , " " ) ; let encoded = serde_json :: to_string ( & input ) . unwrap ( ) ; request . set_payload ( Some ( encoded . into_bytes ( ) ) ) ; self . client . sign_and_dispatch ( request , | response | { if response . status . is_success ( ) { Box :: new ( response . buffer ( ) . from_err ( ) . map ( | response | { let mut body = response . body ; if body . is_empty ( ) || body == b" " { body = b" " . to_vec ( ) ; } serde_json :: from_str :: < IndexFacesResponse > ( String :: from_utf8_lossy ( body . as_ref ( ) ) . as_ref ( ) , ) . unwrap ( ) } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | Err ( IndexFacesError :: from_response ( response ) ) ) , ) } } ) }
<p>Detects faces in the input image and adds them to the specified collection.
<p > Detects faces in the input image and adds them to the specified collection .
&self
input
IndexFacesRequest
&self
input
IndexFacesRequest