-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Cropping doesn't work on V4 #132
Comments
Hey @abalsekar, it's possible that your FaceIndex is out of range and is throwing an error. Recommend checking CloudWatch logs to confirm this but we've added a feature request (#133) to make Smart Cropping fail more gracefully (aka return the original image when the face index is out of range or no faces are detected at all by Rekognition). Hope this helps! |
Also, a potential limitation might be that Rekognition only returns a zero-based array for the first 100 faces detected in an image. So the maximum might be 99 instead of 100 in this particular case. |
We've fixed these issues with smart cropping in v5.2.0. |
Smart cropping fails with Sharp. Using the demo console to produce this JSON request.
{
"bucket": "my-image-bucket",
"key": "my-image-number.jpg",
"edits": {
"resize": {
"width": 100,
"height": 100,
"fit": "inside"
},
"smartCrop": {
"faceIndex": 100
}
}
}
The text was updated successfully, but these errors were encountered: