Skip to content

Missing FaceOccluded in python index_faces with last boto version

0

This is how i send the request:

image = {
        'S3Object': {
            'Bucket': bucket_name,
            'Name': path_s3
        }
    }
rekognition.index_faces(
            CollectionId=collection_id,
            Image=image,
            ExternalImageId=external_id,
            DetectionAttributes=['ALL']
        )

I have these versions:

boto3==1.34.138

botocore==1.34.138

And the response i get is the following, note that FaceOccluded is missing: https://pastebin.com/Z06J9GaV

asked 2 years ago370 views

1 Answer
0

Hello.

It may be a bug in boto3, so it might be better to report it as an issue on GitHub.
https://github.com/boto/boto3/issues

By the way, was it possible to get it in older versions?
For example, try using the previous version and see if you can get it.

By the way, looking at the changelog below, it seems that "FaceOccluded" was added from version "1.26.127", so please make sure to check if you are using this version or a later one to be safe.
https://github.com/boto/boto3/blob/develop/CHANGELOG.rst

EXPERT

answered 2 years ago

  • Nope, it's an issue with the API, using the CLI doesn't work either: The following command:

    aws rekognition index-faces \
      --image '{"S3Object": {"Bucket": "apurata-data-science", "Name": "fraud-images/https:__encrypted-tbn0.gstatic.com_images?q=tbn:ANd9GcRzRklDDB8DmCRwawwiLA95rn2o-shwnoclvA&s"}}' \
      --collection-id faces-collection \
      --detection-attributes "FACE_OCCLUDED" \
      --external-image-id "testing"
    

    Returns the following error: An error occurred (InvalidParameterException) when calling the IndexFaces operation: Incompatible face attribute name: FACE_OCCLUDED

    And if I use --detection-attributes "ALL", I get the following reponse (missing "FACE_OCCLUDED"): https://pastebin.com/RP4YamgM

    This is my aws-cli version:

    > aws --version                                                                                                                                                                                                                       14:42:02
    aws-cli/2.15.10 Python/3.11.6 Linux/6.1.0-22-amd64 exe/x86_64.debian.12 prompt/off
    

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.