AWSのAmazon Novaを使用したスケーラブルなバーチャル試着ソリューション構築:パート1
AWSはAmazon Nova Canvasを用いたスケーラブルなバーチャル試着ソリューションの実装方法を解説し、オンラインファッション販売における高率の返品問題解決と顧客体験向上の可能性を示唆している。
キーポイント
返品問題の背景と課題
オンラインファッション販売における返品率は高く、2024年の米国での返品コストは890億ドルに達しており、フィット感やスタイルの不適合が主要因となっている。
Amazon Nova Canvasの技術的アプローチ
人物画像(ソース)と商品画像(リファレンス)の2つの2次元入力から、自動マスキングや手動調整により、ロゴやテクスチャを保持したまま高精度な試着画像を生成する。
多様なチャネルでの展開可能性
ECサイト、モバイルアプリ、店舗用キオスク、ソーシャルメディア、バーチャルショールームなど、顧客接点の多様化した環境での実装が可能である。
影響分析・編集コメントを表示
影響分析
この記事は、生成AIが単なるコンテンツ作成ツールを超え、実務的な業務効率化(返品削減)と顧客体験の向上という具体的なビジネス課題解決に直接寄与する実用段階にあることを示している。特に、大規模な小売業界におけるROI(投資対効果)と環境サステナビリティの両立という観点から、AWSのエコシステム内でのAI採用を促進する重要な事例となる。
編集コメント
AWSは自社のモデル(Nova Canvas)を宣伝しつつも、業界が長年直面している「返品」という具体的なペインポイントに対して、技術的な解決策を提示しており、実装の具体性が高い。
この 2 部構成シリーズの第 1 報では、小売業者が顧客体験を向上させるためにバーチャル・トライオン(仮想試着)を実装する方法について検討します。第 2 報では、この革新的な技術の実世界での応用と利点についてさらに深く掘り下げていきます。
オンラインで購入される衣類の 4 枚に 1 枚が小売業者へ返品されており、これが 2024 年のアメリカにおける 8900 億ドル規模の返品問題 に拍車をかけています。これらの数字の背後にある単純な真実とは、買い物客が画面越しにフィット感やスタイルを正確に判断できないという事実です。返品されるファッションアイテム の主な理由として上位を占めるのは、フィット感の悪さ、サイズの誤り、あるいはスタイルの不一致です。
小売業者は、最も価値のある顧客ほど多くの商品を返品するという深刻な課題に直面しており、処理コストの高騰や環境への影響にもかかわらず、寛大な返品ポリシーを維持せざるを得ません。各返品は初期配送時よりも 30% 多い炭素排出量を発生させ、商品が在庫に戻されるまでの間、販売機会を逃すことにもなります。デジタルショッピングの加速に伴い、バーチャル・トライオン技術は、顧客の利便性を保ちつつ返品を削減する解決策として登場しましたが、初期の実装では精度やスケーラビリティに課題があり、衣類のドレープ(たれ具合)、パターン、ロゴといった重要なディテールを維持することにも苦労していました。
Amazon Nova Canvas は、仮想試着機能を通じてこれらの課題に対処します。この機能は 2 つの 2 次元画像入力を使用します。1 つは人物や居住空間を示すソース画像、もう 1 つは製品の参照画像です。システムは、自動マスキング機能による自動的な製品配置と、精密な調整のための手動制御の両方を提供しています。プロセス全体を通じて、ロゴやテクスチャなどの重要な詳細を慎重に維持しつつ、カスタマイズ用の包括的なスタイリングコントロールを提供します。
仮想試着は、EC サイトやモバイルショッピングアプリから店舗内のキオスク、ソーシャルメディア上のショッピングプラットフォーム、バーチャルショールームに至るまで、さまざまな顧客エンゲージメントチャネルで展開できます。例えば、EC サイトを訪れて自分の個人画像をアップロードし、そのサイトにある衣類やアクセサリー製品に適用された様子を確認するといったシナリオが想像できます。
以下の画像は、ソース画像、参照画像、マスク画像、そして生成された試着画像を示しています。

本稿では、Amazon Nova Canvas で利用可能になった仮想試着機能について探ります。すぐに始められるためのサンプルコードや、最適な出力を得るためのヒントについても紹介します。
ソリューションの概要
バーチャル試着機能により、小売業者や EC 企業は、衣類や製品の可視化を既存または新規のカスタマー接点に直接統合できます。写真のアップロードと製品選択のみで、顧客はアイテムが自分自身やモデル、あるいは他の配置場所にどのように見えるかを確認できます。Amazon Bedrock のプレイグラウンド内で Amazon Nova Canvas を使用してバーチャル試着を体験することができます。また、ご自身の Amazon Web Services (AWS) 環境において、この機能を軸とした完全なソリューションの実装についてご案内します。以下のセクションでは、デプロイに関する詳細な手順とベストプラクティスを提供します。
このソリューションの中核には、Amazon Bedrock の Amazon Nova Canvas に搭載された新しいバーチャル試着機能が用いられています。このモデルは高速な推論速度を備えており、EC などのリアルタイムアプリケーションに適しています。同時に、パターン、テクスチャ、ロゴなど、参照アイテムの高忠実度な詳細も保持します。また、シーン内での意味的な操作の正確性も維持されます。
当ソリューションは、イベント駆動型アーキテクチャにおいて AWS のサーバーレスサービスと AI 処理機能を組み合わせたものです。Amazon DynamoDB ストリーム が AWS Step Functions ワークフローをトリガーし、Amazon Simple Storage Service (Amazon S3) イベントが結果の配信を管理します。Amazon Bedrock 内の Amazon Nova Canvas は、マスク生成とポーズ検出の両方を担当します。本ソリューションは非同期処理パイプラインに従い、リアルタイムステータス更新を提供します。WebSocket 接続によりクライアントとのリアルタイム通信を維持し、プロセス全体を通じて継続的なユーザーエンゲージメントを実現しています。詳細な実装ガイドやベストプラクティスについては、当社の ガイダンス をご参照ください。
アーキテクチャの詳細解説
リクエストの開始は以下のフローに従います:
- Amazon S3 は、アップロードされた顧客モデルの写真と製品画像を保存します。
- 各アップロードは、Amazon Simple Queue Service (Amazon SQS) キューにメッセージを送信します。AWS Lambda 関数は対応するメタデータと S3 パスを作成し、後で検索できるように DynamoDB 製品のテーブルに格納します。
- Amazon API Gateway は、クライアントとバーチャル・トライオン間のリアルタイムステータス更新のための WebSocket 接続を管理します。
- Lambda は、DynamoDB 製品テーブルから製品情報を取得し、DynamoDB にジョブエントリを作成することで初期リクエストを処理します。
- Amazon DynamoDB: 製品のテーブル (vto-products) は、バーチャル・トライオンで利用可能なカタログアイテム、特に Amazon S3 の画像場所を保存します。
- バーチャル・トライオンのジョブ DynamoDB テーブル (vto-jobs) は、各トライオンリクエストの状態を追跡します。
バーチャル・トライオンの生成は以下のフローに従います:
- DynamoDB Streams は、ジョブ作成時に非同期で AWS Step Functions ワークフローをトリガーし、トライオンリクエストの処理を行います。
- AWS Step Functions は、バーチャル・トライオンの生成をオーケストレーションします。これは、Amazon Bedrock を介して Amazon Nova Canvas モデルを呼び出す Lambda 関数をトリガーします。DynamoDB ジョブテーブルは、バーチャル・トライオンのステータスで更新されます。
結果の配信は以下のフローに従います:
- Amazon S3 は、生成された試着画像をジョブ ID メタデータとともに保存します。
- Amazon SQS は、完了した試着画像の S3 イベント通知を処理します。
- AWS Lambda 関数は、結果の Amazon S3 URL を WebSocket を通じてユーザーに送信します。
次の図は、このソリューションアーキテクチャを示しています。

ソリューションプロセス
このセクションでは、ソリューションのエンドツーエンドのプロセスについて説明します。ソリューションガイダンスには、Amazon S3 イベントを通じて DynamoDB の製品テーブルを自動入力するワークフローなど、本 ソリューション を再現する方法に関する詳細情報が含まれています。
顧客が試着リクエストを開始すると、まず Amazon Cognito でサインインし、保存された写真(複数可)を Amazon S3 にアップロードします。Amazon S3 イベントを通じて DynamoDB の製品テーブルを自動入力するワークフローが用意されています。クライアントは API Gateway を介して WebSocket 接続を確立し、リアルタイム更新のための永続的なチャネルを作成します。クライアントは、仮想試着したい製品の ID と、使用したい静的モデルの S3 URL を送信します。Lambda 関数はこのリクエストを処理し、DynamoDB から製品画像 URL を取得して両方の画像 URL を含むジョブエントリを作成し、追跡用の一意なジョブ ID を返します。
DynamoDB ストリームは、DynamoDB テーブル内の異なる書き込みと更新を調整するためにステップ関数をトリガーします。このステップ関数はまた、Amazon Nova Canvas のバーチャルトライオン機能も呼び出します。モデルの入力として (1) 修正したいベース画像(例えば顧客の画像)、(2) ベース画像に挿入したい製品を含むリファレンス画像が指定されます。衣類の場合、リファレンス画像には装着時・非装着時の両方の衣類を含めることができ、さらに単一の画像内にシャツ、パンツ、靴など異なるアウトレットコンポーネントを表す複数の製品を含めることも可能です。
デフォルトでは、補助入力(maskType: "GARMENT" または maskType: "PROMPT")を使用してマスクが自動的に計算されます。また、開発者が直接マスク画像を提供することもできます(maskType: "IMAGE")。
"GARMENT" というマスクタイプを指定した場合、Amazon Nova Canvas は、あなたが指定する garmentClass 入力パラメータの値に基づいて、衣類認識型のマスクを作成します。ほとんどの場合、以下の高レベルの衣類クラスのいずれかを使用することになります:
- "UPPER_BODY" – アーム全体を含むマスクを作成します。
- "LOWER_BODY" – 脚の隙間なく脚全体を含むマスクを作成します。
- "FOOTWEAR" – ソース画像に示された靴のプロファイルに適合するマスクを作成します。
- "FULL_BODY" – "UPPER_BODY" と "LOWER_BODY" の組み合わせに相当するマスクを作成します。
以下の表は、maskType: "GARMENT" を使用した入力例を示しています。
ソース
リファレンス
衣類クラス
出力
image
image
"FOOTWEAR"
image
以下の表は、maskType: "PROMPT" を使用した入力例を示しています。
ソース画像
マスクプロンプト
リファレンス画像
出力
また、特定の境界ケースにおいて有用となるより細粒度のサブクラスも存在します。"PROMPT" マスクタイプを使用することで、置き換えたいソース画像内のアイテムを自然言語で記述することが可能になります。これは衣類以外のアイテムの画像に対して特に有効です。この機能は、Nova Canvas の "INPAINTING" タスクにおいて既存の自動マスク機能(maskPrompt パラメータ使用)と同一のものを利用しています。
マスクを使用し、どの衣料品領域を置き換える必要があるかを理解することで、入力画像としてユーザーの写真に製品画像が挿入されます。その後、モデルは試着画像を生成し、ジョブ ID をメタデータとして Amazon S3 に保存します。このプロセス全体を通じて、システムは WebSocket 接続を介して進行状況の更新を送信します。Amazon S3 イベント通知が Amazon SQS を経由して Lambda 関数をトリガーします。その関数は結果画像用のプレサイン付き URL を生成し、確立された WebSocket 接続を介してクライアントに配信します。これによりプロセスが完了し、通常は 7〜11 秒で終了します。
実装の詳細
このセクションでは、仮想試着ソリューションで使用されるテーブルとスキーマについて詳細を説明し、各 DynamoDB テーブルが果たす役割をさらに理解していただくための情報を提供します。
本ソリューションでは 4 つの DynamoDB テーブルを使用しています。products_table は、仮想試着に利用可能なアイテムのカタログを格納します。virtual_try_on_jobs テーブルは、各試着リクエストの状態と追跡情報を管理します。vto-models テーブルは、仮想試着に使用される顧客画像のカタログを保存します。WebSocket 接続テーブル(vto-connections)は、リアルタイムのジョブステータス更新のためのアクティブな WebSocket 接続を追跡します。本ソリューションでは、製品テーブルには小売業者の在庫が事前に事前読み込みされていることを前提としています。
vto-products という製品テーブルは、バーチャルトライオン(virtual try-on)のために利用可能なアイテムのカタログを格納しています。製品は、画像が/products/ S3 フォルダにアップロードされると自動的に登録されます。製品テーブルのスキーマは以下の通りです:
- product_id (string, partition key) – 製品の一意な識別子
- product_picture_s3_url (string) – オリジナル製品画像の Amazon S3 URL
- name (string) – 製品表示名
- category (string) – 整理用の製品カテゴリ
- description (string) – スタイル、カラー、サイズオプションを含む製品の詳細情報
- auto_imported (Boolean) – Amazon S3 アップロードを通じて自動的にインポートされたかどうかを示すフラグ
- created_at (string) – 製品が追加された際の ISO タイムスタンプ
- updated_at (string) – 最終変更時の ISO タイムスタンプ
vto-models というモデルテーブルは、バーチャルトライオンに使用される顧客画像のカタログを格納しています。モデルは、画像が/models/ S3 フォルダにアップロードされると自動的に登録されます。モデルテーブルのスキーマは以下の通りです:
- model_id (string, partition key) – モデルの一意識別子
- model_picture_s3_url (string) – モデル画像の Amazon S3 URL
- name (string) – モデル表示名
- category (string) – 整理用のモデルカテゴリ
- description (string) – モデルの詳細と特徴
- auto_imported (Boolean) – Amazon S3 アップロードを使用して自動的にインポートされたかどうかを示すフラグ
- created_at (string) – モデルが追加された際の ISO タイムスタンプ
- updated_at (string) – 最終変更時の ISO タイムスタンプ
バーチャルトライオンジョブテーブル(vto-jobs)は、処理ワークフロー全体を通じて各トライオンリクエストの状態と追跡情報を維持します。バーチャルトライオンジョブテーブルのスキーマは以下の通りです:
- id (string, partition key) – 各トライオンジョブの一意識別子
- model_id (string) – 使用されたモデルへの参照
- product_id (string) – トライオンされる製品への参照
- model_picture_s3_url (string) – カスタマーがアップロードした写真の Amazon S3 URL
- product_picture_s3_url (string) – トライオンされる製品の Amazon S3 URL
result_s3_url (string)
原文を表示
In this first post in a two-part series, we examine how retailers can implement a virtual try-on to improve customer experience. In part 2, we will further explore real-world applications and benefits of this innovative technology.
Every fourth piece of clothing bought online is returned to the retailer, feeding into America’s $890 billion returns problem in 2024. Behind these numbers lies a simple truth: shoppers can’t judge fit and style through their screens. Among the top reasons for returned fashion items are poor fit, wrong size, or style mismatch.
Retailers face a critical challenge in that their most valuable customers often return the most items, forcing them to maintain generous return policies despite steep processing costs and environmental impact. Each return produces 30% more carbon emissions than the initial delivery and represents a missed sales opportunity until items are processed back into inventory. As digital shopping accelerates, virtual try-on technology has emerged as a solution to reduce returns while maintaining customer convenience, but early implementations struggled with accuracy, scalability, and preserving crucial details such as garment draping, patterns, and logos.
Amazon Nova Canvas addresses these challenges through its virtual try-on capability, which uses two two-dimensional image inputs: a source image showing a person or living space and a reference image of the product. The system offers both automatic product placement through auto-masking functionality and manual controls for precise adjustments. Throughout the process, it carefully preserves important details such as logos and textures while providing comprehensive styling controls for customization.
Virtual try-on can be deployed across multiple customer engagement channels, from ecommerce websites and mobile shopping apps to in-store kiosks, social media shopping platforms, and virtual showrooms. Imagine visiting an ecommerce website, uploading your personal image, and seeing it applied across the clothing and accessory products on that website.
The following image shows a source image, a reference image, a mask image, and the resulting try-on image.

In this post, we explore the virtual try-on capability now available in Amazon Nova Canvas, including sample code to get started quickly and tips to help get the best outputs.
Solution overview
With virtual try-on capability, retailers and ecommerce companies can integrate garment and product visualization directly into their existing or new customer touch points. Using only a photo upload and product selection, customers can see how items would look on themselves, a model, or other placement. You can experiment with virtual try-on in Amazon Nova Canvas within the Amazon Bedrock playground. And, we’ll guide you through implementing a complete solution around this feature in your own Amazon Web Services (AWS) environment. The following section provides detailed instructions and best practices for deployment.
At its core, the solution uses the new virtual try-on in Amazon Nova Canvas in Amazon Bedrock. This model offers fast inference speeds, making it suitable for real-time applications such as ecommerce. At the same time, it preserves high-fidelity details of reference items, including patterns, textures, and logos. The model maintains accurate semantic manipulations within scenes.
Our solution combines AWS serverless services with AI processing capabilities in an event-driven architecture. Amazon DynamoDB Streams triggers an AWS Step Functions workflow and Amazon Simple Storage Service (Amazon S3) events to manage result delivery. Amazon Nova Canvas in Amazon Bedrock manages both the mask generation and pose detection. The solution follows an asynchronous processing pipeline with real-time status updates in which WebSocket connections maintain real-time communication with clients, enabling continuous user engagement throughout the process. For detailed implementation guidance and best practices, refer to our guidance.
Detailed explanation of the architecture
The request initiation follows this flow:
- Amazon S3 stores the uploaded customer model photos and product images.
- Each upload generates a message sent to an Amazon Simple Queue Service (Amazon SQS) queue. The AWS Lambda function creates the corresponding metadata and S3 path and stores it in the DynamoDB product table for later retrieval.
- Amazon API Gateway manages the WebSocket connections for real-time status updates between the client and the virtual try-on.
- Lambda processes initial requests by retrieving product information in the DynamoDB product table and creating job entries in DynamoDB.
- Amazon DynamoDB: The products table (vto-products) stores catalog items available for the virtual try-on, notably the Amazon S3 picture location.
- The virtual try-on jobs DynamoDB table (vto-jobs) tracks the state of each try-on request.
The virtual try-on generation follows this flow:
- DynamoDB Streams asynchronously triggers AWS Step Functions workflows on job creation for processing try-on requests.
- AWS Step Functions orchestrates the virtual try-on generation. It triggers a Lambda function that calls the Amazon Nova Canvas model through Amazon Bedrock. The DynamoDB job table is updated with the virtual try-on status.
The result delivery follows this flow:
- Amazon S3 stores the generated try-on images with job ID metadata.
- Amazon SQS handles S3 event notifications for completed try-on images.
- AWS Lambda function sends the Amazon S3 URL of the result back to the user through WebSocket.
The following diagram illustrates the solution architecture.

Solution process
This section explains the end-to-end process of the solution. The solution guidance provides further details and information on how you can replicate the solution.
When your customer initiates a try-on request, they first sign in on Amazon Cognito and then upload their photo(s) stored into Amazon S3. A workflow is available to auto populate the product table in DynamoDB through Amazon S3 events. The client establishes a WebSocket connection through API Gateway, creating a persistent channel for real-time updates. The client sends the ID of the product they want to virtually try as well as the S3 URL of the static model they want to use. A Lambda function processes this request by retrieving the product image URL from DynamoDB and creating a job entry with both image URLs, returning a unique job ID for tracking.
DynamoDB stream then triggers a step function to coordinate the different writes and updates in the DynamoDB table. The step function also invokes Amazon Nova Canvas virtual try-on feature. The model takes as input (1) the source image, which is the base image you would like to modify (for example, the image of the customer), (2) the reference image, which is an image containing the product(s) you want to insert into the base image. For garments, the reference image can contain garments on or off body and can even contain multiple products representing distinct outfit components (such as a shirt, pants, and shoes in a single image).
By default, a mask is computed automatically using auxiliary inputs (maskType: "GARMENT" or maskType: "PROMPT"). The mask image can either be provided directly by the developer (maskType: "IMAGE").
When a mask type of “GARMENT” is specified, Amazon Nova Canvas will create a garment-aware mask based on a garmentClass input parameter value you specify. In most cases, you will use one of the following high-level garment classes:
- "UPPER_BODY" – Creates a mask that includes full arm length.
- "LOWER_BODY" – Creates a mask the includes full leg length with no gap between the legs.
- "FOOTWEAR" – Creates a mask that fits the shoe profile demonstrated in the source image.
- "FULL_BODY" – Creates a mask equivalent to the combination of "UPPER_BODY" and "LOWER_BODY".
The following table shows example inputs with maskType: "GARMENT".
Source
Reference
Garment class
Output


“FOOTWEAR”
The following table shows example inputs with maskType: "PROMPT".
Source image
Mask prompt
Reference image
Output




There are also more fine-grained subclasses that can be useful in certain edge cases. By using the “PROMPT” mask type, you can use natural language to describe the item in the source image that you want to replace. This is useful for images of items other than garments. This feature uses the same auto-masking functionality that exists in the Nova Canvas “INPAINTING” task using the maskPrompt parameter.
By using the mask and understanding which garment areas needs to be replaced, the product image is inserted on the user’s photo as input. The model then generates the try-on image, which is stored in Amazon S3 with the job ID as metadata. Throughout this process, the system sends progress updates through the WebSocket connection. An Amazon S3 event notification triggers a Lambda function through Amazon SQS. The function generates a presigned URL for the result image and delivers it to the client through the established WebSocket connection. This completes the process, typically taking 7–11 seconds.
Implementation details
This section details the tables and schema used in our virtual try-on solution to help you further understand how the role each DynamoDB tables plays.
This solution uses four DynamoDB tables. The products_table stores the catalog of available items for virtual try-on. The virtual_try_on_jobs table maintains the state and tracking information for each try-on request. The vto-models table stores the catalog of customers images used for virtual try-on. The WebSocket connections table (vto-connections) tracks active WebSocket connections for real-time job status updates. The solution assumes the products table is prepopulated with the retailer’s inventory.
The products table (vto-products) stores the catalog of available items for virtual try-on. Products are automatically populated when images are uploaded to the /products/ S3 folder. The schema for the products table is as follows:
- product_id (string, partition key) – Unique identifier for the product
- product_picture_s3_url (string) – Amazon S3 URL of the original product image
- name (string) – Product display name
- category (string) – Product category for organization
- description (string) – Product details including style, color, and size options
- auto_imported (Boolean) – Flag indicating if product was imported automatically through Amazon S3 upload
- created_at (string) – ISO timestamp when product was added
- updated_at (string) – ISO timestamp of last modification
The models table (vto-models) stores the catalog of customer images used for virtual try-on. Models are automatically populated when images are uploaded to the /models/ S3 folder. The schema for the models table is as follows:
- model_id (string, partition key) – Unique identifier for the model
- model_picture_s3_url (string) – Amazon S3 URL of the model image
- name (string) – Model display name
- category (string) – Model category for organization
- description (string) – Model details and characteristics
- auto_imported (Boolean) – Flag indicating if model was imported automatically using Amazon S3 upload
- created_at (string) – ISO timestamp when model was added
- updated_at (string) – ISO timestamp of last modification
The virtual try-on jobs table (vto-jobs) maintains state and tracking information for each try-on request throughout the processing workflow. The schema for the virtual try-on jobs table is as follows:
- id (string, partition key) – Unique identifier for each try-on job
- model_id (string) – Reference to the model used
- product_id (string) – Reference to the product being tried on
- model_picture_s3_url (string) – Amazon S3 URL of the customer’s uploaded photo
- product_picture_s3_url (string) – Amazon S3 URL of the product being tried on
result_s3_url (string)
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み