Smart image cropper

Automatically crop and center pictures of individuals

This AWS Step Functions workflow automates the process of intelligently cropping pictures of individuals. Its main purpose is to crop around a picture of a person, removing any unnecessary background and focusing solely on the person in the image. The workflow is triggered whenever an image is uploaded to an S3 bucket. Once triggered, the image is retrieved and sent to Amazon Rekognition, where the detect_labels function is used to identify the objects within the image. If the function returns a person label, the image is cropped accordingly and saved to another S3 bucket.

< Back to all workflows

GitHub icon View this workflow on GitHub


Clone repo

git clone https://github.com/aws-samples/step-functions-workflows-collection/tree/main/background-cropper/cd step-functions-workflows-collection/background-cropper

Deploy

git clone https://github.com/aws-samples/step-functions-workflows-collection/cd background-cropper-cdk


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: cdk destroy.

Additional resources

Created by:

Vi Nguyen

Associate Solutions Architect, AWS

Visakh Madathil

Associate Solutions Architect, AWS