old bug in CompareFaces JPG throws error if no face; when will it be fixed?

0

Hello

There is a very old bug (first reported on this forum in 2017 and again in 2018) that throws error Invalid Parameter Exception when CompareFaces is called with input JPEG file to search for a given face and the output/search JPEG does not have any faces on it.

In other words - the Input Image (S3 object) does have a Face to look for and the Output JPEG photo to compare does not have any face on it or not any recognizable face (such as person is facing backwards, for example) or output image JPEG has a photo of a bottle or large object which obscures the Input face. So it just throws Invalid Parameter Exception which is 100% wrong.

This is akin to throwing invalid parameter error when End Of File is found on Read - which is not error but an expected condition of reading a file.

This bug that makes Rekognition too slow to use and unproductive because the error is bogus. We are required to make 2 API calls (costing both time and money) to first detect any face on output JPG file and only then call compare-face if any face is found by a detect method. Why?

Compare Face call should simply return 0.0 confidence output with API success if there is no face on the output search JPEG, it should not return spurious errors because this condition is not error, the no-face-found is a perfectly acceptable result.

When will this bug be fixed??

I have tried using Rekognition today (9 Nov 2021) and still getting Invalid Parameter Exception error.

thank you.

YuriB
asked 2 years ago399 views
2 Answers
0

Hello,
Throwing an InvalidParameterException is currently expected behavior when calling CompareFaces[1] and one of the images does not have a valid face. Based on your description, to minimize API calls, we recommend you call DetectFaces for the images only after CompareFaces returns an InvalidParameterException. That said, we realize this can be optimized further and have filed a feature request in our backlog for consideration. Thank you for your valuable feedback!”

https://docs.aws.amazon.com/rekognition/latest/dg/API_CompareFaces.html

AWS
answered 2 years ago
0

thanks,

yes, I ended up calling detect_face() first to stop getting the bogus error from compare_face() if there is no face on JPG.
I could also modify code to ignore this error but that it creates a problem if there is a real invalid parameter error - not due to missing face.

it is just surprising and frustrating that this behavior has been known since 2017-2018 and it still not fixed at end of 2021.

YuriB
answered 2 years ago

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.

Guidelines for Answering Questions