def search_faces_by_image(CollectionId=None, Image=None, MaxFaces=None,
    FaceMatchThreshold=None):
    """
    For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces. The operation compares the features of the input face with faces in the specified collection.
    The response returns an array of faces that match, ordered by similarity score with the highest similarity first. More specifically, it is an array of metadata for each face match found. Along with the metadata, the response also includes a similarity indicating how similar the face is to the input face. In the response, the operation also returns the bounding box (and a confidence level that the bounding box contains a face) of the face that Amazon Rekognition used for the input image.
    For an example, see  example3 .
    This operation requires permissions to perform the rekognition:SearchFacesByImage action.
    See also: AWS API Documentation
    
    Examples
    This operation searches for faces in a Rekognition collection that match the largest face in an S3 bucket stored image.
    Expected Output:
    
    :example: response = client.search_faces_by_image(
        CollectionId='string',
        Image={
            'Bytes': b'bytes',
            'S3Object': {
                'Bucket': 'string',
                'Name': 'string',
                'Version': 'string'
            }
        },
        MaxFaces=123,
        FaceMatchThreshold=...
    )
    
    
    :type CollectionId: string
    :param CollectionId: [REQUIRED]
            ID of the collection to search.
            

    :type Image: dict
    :param Image: [REQUIRED]
            Provides the source image either as bytes or an S3 object.
            You pass image bytes to a Rekognition API operation by using the Bytes property. For example, you would use the Bytes property to pass an image loaded from a local file system. Image bytes passed by using the Bytes property must be base64-encoded. Your code may not need to encode image bytes if you are using an AWS SDK to call Rekognition API operations. For more information, see example4 .
            You pass images stored in an S3 bucket to a Rekognition API operation by using the S3Object property. Images stored in an S3 bucket do not need to be base64-encoded.
            The region for the S3 bucket containing the S3 object must match the region you use for Amazon Rekognition operations.
            If you use the Amazon CLI to call Amazon Rekognition operations, passing image bytes using the Bytes property is not supported. You must first upload the image to an Amazon S3 bucket and then call the operation using the S3Object property.
            For Amazon Rekognition to process an S3 object, the user must have permission to access the S3 object. For more information, see manage-access-resource-policies .
            Bytes (bytes) --Blob of image bytes up to 5 MBs.
            S3Object (dict) --Identifies an S3 object as the image source.
            Bucket (string) --Name of the S3 bucket.
            Name (string) --S3 object key name.
            Version (string) --If the bucket is versioning enabled, you can specify the object version.
            
            

    :type MaxFaces: integer
    :param MaxFaces: Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.

    :type FaceMatchThreshold: float
    :param FaceMatchThreshold: (Optional) Specifies the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%.

    :rtype: dict
    :return: {
        'SearchedFaceBoundingBox': {
            'Width': ...,
            'Height': ...,
            'Left': ...,
            'Top': ...
        },
        'SearchedFaceConfidence': ...,
        'FaceMatches': [
            {
                'Similarity': ...,
                'Face': {
                    'FaceId': 'string',
                    'BoundingBox': {
                        'Width': ...,
                        'Height': ...,
                        'Left': ...,
                        'Top': ...
                    },
                    'ImageId': 'string',
                    'ExternalImageId': 'string',
                    'Confidence': ...
                }
            },
        ]
    }
    
    
    """
    pass
