Smart Cropping doesn't work on V4
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 } } }
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.