1 Answer
- Newest
- Most votes
- Most comments
0
I got things working. I'm not 100% sure what the key difference was but here are the changes I made:
- I switched to using the @aws-sdk/client-rekognition node package instead of aws-sdk (which is what the https://docs.aws.amazon.com/rekognition/latest/dg/faces-comparefaces.html docs use).
- I realized that calling CompareFaces from node will return an InvalidImageFormatException if one of the images does not contain any faces. How frustrating. I thought this indicated that my image format/data was incorrect. Who knows when my code might have actually been working but I thought it wasn't because of this unclear error. So what I did was catch that error and assume I actually used correct image inputs, but that there essentially is zero matches because one of the images lacks faces.
- Made certain I was setting my credentials correctly (https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html). I'm pretty sure I already was... but did make some changes in this regard.
answered 2 years ago
Relevant content
- asked 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago