On this first publish in a two-part sequence, we look at how retailers can implement a digital try-on to enhance buyer expertise. Partially 2, we’ll additional discover real-world functions and advantages of this revolutionary expertise.
Each fourth piece of clothes purchased on-line is returned to the retailer, feeding into America’s $890 billion returns drawback in 2024. Behind these numbers lies a easy reality: buyers can’t decide match and elegance by way of their screens. Among the many prime causes for returned fashion items are poor match, improper dimension, or model mismatch.
Retailers face a crucial problem in that their Most worthy prospects typically return probably the most objects, forcing them to keep up beneficiant return insurance policies regardless of steep processing prices and environmental influence. Every return produces 30% extra carbon emissions than the preliminary supply and represents a missed gross sales alternative till objects are processed again into stock. As digital procuring accelerates, digital try-on expertise has emerged as an answer to cut back returns whereas sustaining buyer comfort, however early implementations struggled with accuracy, scalability, and preserving essential particulars equivalent to garment draping, patterns, and logos.
Amazon Nova Canvas addresses these challenges by way of its digital try-on functionality, which makes use of two two-dimensional picture inputs: a supply picture exhibiting an individual or residing house and a reference picture of the product. The system provides each automated product placement by way of auto-masking performance and guide controls for exact changes. All through the method, it rigorously preserves necessary particulars equivalent to logos and textures whereas offering complete styling controls for personalization.
Digital try-on will be deployed throughout a number of buyer engagement channels, from ecommerce web sites and cell procuring apps to in-store kiosks, social media procuring platforms, and digital showrooms. Think about visiting an ecommerce web site, importing your private picture, and seeing it utilized throughout the clothes and accent merchandise on that web site.
The next picture reveals a supply picture, a reference picture, a masks picture, and the ensuing try-on picture.
On this publish, we discover the digital try-on functionality now accessible in Amazon Nova Canvas, together with pattern code to get began rapidly and ideas to assist get the perfect outputs.
Resolution overview
With digital try-on functionality, retailers and ecommerce corporations can combine garment and product visualization straight into their present or new buyer contact factors. Utilizing solely a photograph add and product choice, prospects can see how objects would look on themselves, a mannequin, or different placement. You’ll be able to experiment with digital try-on in Amazon Nova Canvas throughout the Amazon Bedrock playground. And, we’ll information you thru implementing an entire resolution round this function in your individual Amazon Internet Companies (AWS) setting. The next part gives detailed directions and greatest practices for deployment.
At its core, the answer makes use of the brand new digital try-on in Amazon Nova Canvas in Amazon Bedrock. This mannequin provides quick inference speeds, making it appropriate for real-time functions equivalent to ecommerce. On the similar time, it preserves high-fidelity particulars of reference objects, together with patterns, textures, and logos. The mannequin maintains correct semantic manipulations inside scenes.
Our resolution combines AWS serverless companies with AI processing capabilities in an event-driven structure. Amazon DynamoDB Streams triggers an AWS Step Features workflow and Amazon Easy Storage Service (Amazon S3) occasions to handle outcome supply. Amazon Nova Canvas in Amazon Bedrock manages each the masks era and pose detection. The answer follows an asynchronous processing pipeline with real-time standing updates during which WebSocket connections preserve real-time communication with shoppers, enabling steady consumer engagement all through the method. For detailed implementation steering and greatest practices, consult with our steering.
Detailed clarification of the structure
The request initiation follows this circulate:
- Amazon S3 shops the uploaded buyer mannequin photographs and product photographs.
- Every add generates a message despatched to an Amazon Easy Queue Service (Amazon SQS) queue. The AWS Lambda perform creates the corresponding metadata and S3 path and shops it within the DynamoDB product desk for later retrieval.
- Amazon API Gateway manages the WebSocket connections for real-time standing updates between the shopper and the digital try-on.
- Lambda processes preliminary requests by retrieving product info within the DynamoDB product desk and creating job entries in DynamoDB.
- Amazon DynamoDB: The merchandise desk (
vto-products) shops catalog objects accessible for the digital try-on, notably the Amazon S3 image location. - The digital try-on jobs DynamoDB desk (
vto-jobs) tracks the state of every try-on request.
The digital try-on era follows this circulate:
- DynamoDB Streams asynchronously triggers AWS Step Features workflows on job creation for processing try-on requests.
- AWS Step Features orchestrates the digital try-on era. It triggers a Lambda perform that calls the Amazon Nova Canvas mannequin by way of Amazon Bedrock. The DynamoDB job desk is up to date with the digital try-on standing.
The outcome supply follows this circulate:
- Amazon S3 shops the generated try-on photographs with job ID metadata.
- Amazon SQS handles S3 occasion notifications for accomplished try-on photographs.
- AWS Lambda perform sends the Amazon S3 URL of the outcome again to the consumer by way of WebSocket.
The next diagram illustrates the answer structure.

Resolution course of
This part explains the end-to-end strategy of the answer. The answer steering gives additional particulars and data on how one can replicate the solution.
When your buyer initiates a try-on request, they first register on Amazon Cognito after which add their picture(s) saved into Amazon S3. A workflow is out there to auto populate the product desk in DynamoDB by way of Amazon S3 occasions. The shopper establishes a WebSocket connection by way of API Gateway, making a persistent channel for real-time updates. The shopper sends the ID of the product they wish to nearly attempt in addition to the S3 URL of the static mannequin they wish to use. A Lambda perform processes this request by retrieving the product picture URL from DynamoDB and making a job entry with each picture URLs, returning a novel job ID for monitoring.
DynamoDB stream then triggers a step perform to coordinate the totally different writes and updates within the DynamoDB desk. The step perform additionally invokes Amazon Nova Canvas digital try-on function. The mannequin takes as enter (1) the supply picture, which is the bottom picture you want to modify (for instance, the picture of the shopper), (2) the reference picture, which is a picture containing the product(s) you wish to insert into the bottom picture. For clothes, the reference picture can include clothes on or off physique and may even include a number of merchandise representing distinct outfit parts (equivalent to a shirt, pants, and sneakers in a single picture).
By default, a masks is computed robotically utilizing auxiliary inputs (maskType: "GARMENT" or maskType: "PROMPT"). The masks picture can both be supplied straight by the developer (maskType: "IMAGE").
When a masks kind of “GARMENT” is specified, Amazon Nova Canvas will create a garment-aware masks primarily based on a garmentClass enter parameter worth you specify. Most often, you’ll use one of many following high-level garment courses:
"UPPER_BODY"– Creates a masks that features full arm size."LOWER_BODY"– Creates a masks the consists of full leg size with no hole between the legs."FOOTWEAR"– Creates a masks that matches the shoe profile demonstrated within the supply picture."FULL_BODY"– Creates a masks equal to the mixture of"UPPER_BODY"and"LOWER_BODY".
The next desk reveals instance inputs with maskType: "GARMENT".
| Supply | Reference | Garment class | Output |
![]() |
![]() |
![]() |
The next desk reveals instance inputs with maskType: "PROMPT".
| Supply picture | Masks immediate | Reference picture | Output |
![]() |
![]() |
![]() |
![]() |
There are additionally extra fine-grained subclasses that may be helpful in sure edge instances. Through the use of the “PROMPT” masks kind, you should utilize pure language to explain the merchandise within the supply picture that you just wish to change. That is helpful for photographs of things apart from clothes. This function makes use of the identical auto-masking performance that exists within the Nova Canvas “INPAINTING” process utilizing the maskPrompt parameter.
Through the use of the masks and understanding which garment areas must be changed, the product picture is inserted on the consumer’s picture as enter. The mannequin then generates the try-on picture, which is saved in Amazon S3 with the job ID as metadata. All through this course of, the system sends progress updates by way of the WebSocket connection. An Amazon S3 occasion notification triggers a Lambda perform by way of Amazon SQS. The perform generates a presigned URL for the outcome picture and delivers it to the shopper by way of the established WebSocket connection. This completes the method, usually taking 7–11 seconds.
Implementation particulars
This part particulars the tables and schema utilized in our digital try-on resolution that will help you additional perceive how the position every DynamoDB tables performs.
This resolution makes use of 4 DynamoDB tables. The products_table shops the catalog of accessible objects for digital try-on. The virtual_try_on_jobs desk maintains the state and monitoring info for every try-on request. The vto-models desk shops the catalog of shoppers photographs used for digital try-on. The WebSocket connections desk (vto-connections) tracks lively WebSocket connections for real-time job standing updates. The answer assumes the merchandise desk is prepopulated with the retailer’s stock.
The merchandise desk (vto-products) shops the catalog of accessible objects for digital try-on. Merchandise are robotically populated when photographs are uploaded to the /merchandise/ S3 folder. The schema for the merchandise desk is as follows:
- product_id (string, partition key) – Distinctive identifier for the product
- product_picture_s3_url (string) – Amazon S3 URL of the unique product picture
- title (string) – Product show title
- class (string) – Product class for group
- description (string) – Product particulars together with model, coloration, and dimension choices
- auto_imported (Boolean) – Flag indicating if product was imported robotically by way of Amazon S3 add
- created_at (string) – ISO timestamp when product was added
- updated_at (string) – ISO timestamp of final modification
The fashions desk (vto-models) shops the catalog of buyer photographs used for digital try-on. Fashions are robotically populated when photographs are uploaded to the /fashions/ S3 folder. The schema for the fashions desk is as follows:
- model_id (string, partition key) – Distinctive identifier for the mannequin
- model_picture_s3_url (string) – Amazon S3 URL of the mannequin picture
- title (string) – Mannequin show title
- class (string) – Mannequin class for group
- description (string) – Mannequin particulars and traits
- auto_imported (Boolean) – Flag indicating if mannequin was imported robotically utilizing Amazon S3 add
- created_at (string) – ISO timestamp when mannequin was added
- updated_at (string) – ISO timestamp of final modification
The digital try-on jobs desk (vto-jobs) maintains state and monitoring info for every try-on request all through the processing workflow. The schema for the digital try-on jobs desk is as follows:
- id (string, partition key) – Distinctive identifier for every try-on job
- model_id (string) – Reference to the mannequin used
- product_id (string) – Reference to the product being tried on
- model_picture_s3_url (string) – Amazon S3 URL of the shopper’s uploaded picture
- product_picture_s3_url (string) – Amazon S3 URL of the product being tried on
- result_s3_url (string) – Amazon S3 URL of the generated digital try-on outcome picture
- standing (string) – Present job standing (created, processing, accomplished, or error)
- parameters (map) – Digital try-on API parameters (equivalent to
maskType,mergeStyle, orgarmentClass) - connection_id (string) – WebSocket connection ID for real-time updates
- error_message (string) – Error particulars if job fails
- created_at (string) – ISO timestamp when job was created
- updated_at (string) – ISO timestamp of final standing replace
The WebSocket connections desk (vto-connections) tracks lively WebSocket connections for real-time job standing updates. Additional info on how utilizing WebSocket API will be discovered on the Create a WebSocket chat app with a WebSocket API, Lambda, and DynamoDB tutorial. The schema is as follows:
- connection_id (string, partition key) – WebSocket connection identifier
- connected_at (string) – ISO timestamp when connection was established
- ttl (quantity) – Time-to-live for automated cleanup of stale connections
Conclusion
On this publish, we coated methods to implement digital try-on at scale, protecting the primary constructing blocks. For a fast begin, we offer an entire GitHub sample with stipulations, deployment scripts, instance code and a complete resolution steering doc with greatest practices and configuration particulars. Use this information to get began straight away in experimenting with the answer.
As ecommerce continues to develop, decreasing return charges whereas sustaining buyer satisfaction turns into more and more crucial for retailers’ profitability and sustainability. This Digital try-on resolution demonstrates how AWS serverless companies will be mixed with generative AI to handle a big problem. Through the use of Amazon Nova Canvas alongside a sturdy serverless structure, retailers can present prospects with correct product visualization and pose conservation whereas sustaining the seamless procuring expertise their most loyal prospects anticipate. Implementation concerns lengthen past the technical structure. Profitable deployment requires cautious consideration to service quotas, monitoring, and price optimization. Our resolution steering gives additional detailed suggestions for managing WebSocket connections, implementing retry methods, and optimizing useful resource utilization. These operational points are essential for sustaining dependable efficiency throughout peak procuring durations whereas managing prices successfully.
Concerning the authors








