Virtual Try-On について
Virtual Try-On は each::sense API を使い、人物写真に服、アクセサリー、メイク、ヘアスタイルを反映するスキルです。商品やコーディネートの確認に使え、複数アイテムの組み合わせや連続した試着にも対応します。
主な機能
- 01服や靴のバーチャル試着
- 02眼鏡・ジュエリー・時計の確認
- 03メイクや髪型の変更
- 04複数アイテムのコーディネート
- 05セッション内での連続試着
活用シーン
- 01スーツごとの見え方を比較
- 02眼鏡やジュエリーの着用イメージ確認
- 03フォーマルな行事の全身コーデ作成
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ eachlabs/ skills --skill virtual-try-onインストール後、Claude Code で/virtual-try-onを入力して読み込まれたか確認します。
同梱ファイルreferences/SSE-EVENTS.md
詳細
バーチャル試着
AI を活用したバーチャル試着ソリューションです。ユーザーは実際に商品を試着することなく、衣服、アクセサリー、メイク、ヘアスタイルが自分にどのように見えるかを確認できます。
概要
Virtual Try-On スキルは each::sense API を活用し、次のようなリアルなビジュアルを提供します。
- 衣服の試着:シャツ、ドレス、ジャケット、パンツ、全身コーディネート
- アクセサリー:メガネ、サングラス、ジュエリー、腕時計、スカーフ、帽子
- メイク:口紅、アイシャドウ、ファンデーション、チーク、フルメイク
- ヘアスタイル:さまざまなヘアカット、カラー、スタイリング
- 靴:スニーカー、ヒール、ブーツ、サンダル
- ジュエリー:ネックレス、イヤリング、ブレスレット、指輪
クイックスタート
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Show me wearing this dress"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/person-photo.jpg",
"https://example.com/dress-product.jpg"
],
"mode": "max"
}'
試着カテゴリー
| カテゴリー | 説明 | アイテムの例 |
|---|---|---|
| 衣服 | アパレル、衣類 | シャツ、ドレス、ジャケット、パンツ、コート |
| 靴 | フットウェア | スニーカー、ヒール、ブーツ、サンダル、ローファー |
| メガネ | アイウェア | 度付きメガネ、サングラス、老眼鏡 |
| ジュエリー | 装飾用アクセサリー | ネックレス、イヤリング、ブレスレット、指輪 |
| メイク | 化粧品 | 口紅、アイシャドウ、ファンデーション、チーク |
| ヘアスタイル | ヘアスタイルの変更 | ヘアカット、ヘアカラー、スタイリング |
| 腕時計 | 手首に着ける時計 | アナログ時計、スマートウォッチ、高級腕時計 |
ユースケースの例
1. 衣服の試着
特定の衣服が人物にどのように見えるかを確認します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Show me wearing this blue blazer. Keep my face and body proportions accurate."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/my-photo.jpg",
"https://example.com/blue-blazer.jpg"
],
"mode": "max"
}'
2. メガネ/アイウェアの試着
さまざまなスタイルのアイウェアをバーチャルで試着します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Put these round tortoiseshell glasses on me. Make sure the fit looks natural on my face shape."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/face-photo.jpg",
"https://example.com/tortoiseshell-glasses.jpg"
],
"mode": "max"
}'
3. ジュエリーの試着
ネックレス、イヤリング、ブレスレットなどのジュエリーがどのように見えるかを確認します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Show me wearing this gold necklace. Position it naturally on my neckline."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/portrait-photo.jpg",
"https://example.com/gold-necklace.jpg"
],
"mode": "max"
}'
4. 腕時計の試着
腕時計を試着して、手首にどのようにフィットするかを確認します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Put this luxury watch on my wrist. Show how it looks from a natural angle."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/wrist-photo.jpg",
"https://example.com/luxury-watch.jpg"
],
"mode": "max"
}'
5. メイクの試着
バーチャルメイクや特定の化粧品を試します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Apply this red lipstick shade to my lips. Keep the rest of my makeup natural."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/face-closeup.jpg",
"https://example.com/red-lipstick-product.jpg"
],
"mode": "max"
}'
6. ヘアスタイルの試着
さまざまなヘアスタイルやヘアカラーを試します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Give me this bob haircut style. Match the hair color to the reference image."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/my-current-photo.jpg",
"https://example.com/bob-hairstyle-reference.jpg"
],
"mode": "max"
}'
7. 靴の試着
さまざまなフットウェアがどのように見えるかを確認します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Show me wearing these white sneakers. Display a full body view."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/full-body-photo.jpg",
"https://example.com/white-sneakers.jpg"
],
"mode": "max"
}'
8. 全身コーディネート
複数の衣服を組み合わせて、全身のコーディネートを作成します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Style me in this complete outfit - the jacket, pants, and shoes together. Create a cohesive look."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/my-photo.jpg",
"https://example.com/leather-jacket.jpg",
"https://example.com/black-jeans.jpg",
"https://example.com/boots.jpg"
],
"mode": "max"
}'
9. アクセサリーの組み合わせ
複数のアクセサリーを組み合わせて、トータルコーディネートを作成します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Put these sunglasses and this scarf on me together. Make the accessories complement each other."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/portrait.jpg",
"https://example.com/aviator-sunglasses.jpg",
"https://example.com/silk-scarf.jpg"
],
"mode": "max"
}'
10. イベント向けスタイリング
特定のシーンに合わせたコーディネートを作成します。
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Dress me for a formal wedding. Use this evening gown and add elegant jewelry to complete the look."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": [
"https://example.com/my-photo.jpg",
"https://example.com/evening-gown.jpg",
"https://example.com/pearl-earrings.jpg"
],
"mode": "max"
}'
image_urls の使用方法
image_urls パラメーターは、バーチャル試着に使用する画像 URL の配列を受け取ります。
| 順番 | 用途 | 要件 |
|---|---|---|
| 1 枚目の画像 | 人物写真 | 人物をはっきりと写した、明るい写真 |
| 2 枚目の画像 | 商品/アイテムの写真 | 無地の背景に商品がはっきりと写った画像 |
| 追加の画像 | 複数の商品 | 1 回の試着で複数のアイテムを組み合わせる場合に使用 |
画像のガイドライン
- 人物写真:正面を向き、照明が適切で、関連する身体の部位が見える写真
- 商品写真:高解像度で、商品の細部がはっきりとわかり、背景に余計なものが少ない写真
- 対応形式:JPEG、PNG、WebP
- 推奨解像度:最良の結果を得るには 1024x1024 以上
ベストプラクティス
写真の品質
-
人物写真の要件:
- 明るく、高解像度の画像を使用してください
- 関連する身体の部位がはっきり見えるようにしてください(メガネの場合は顔、衣服の場合は全身)
- 強いフィルターや極端な角度は避けてください
- 多くの試着では、正面を向いた写真が最適です
-
商品写真の要件:
- 入手可能な場合は、公式の商品画像を使用してください
- 商品がはっきりと見え、何かに隠れていないことを確認してください
- 白または無地の背景が最適です
- 複数の角度からの画像を使うと、精度が向上する場合があります
プロンプトのヒント
- 具体的にする:アイテムをどのように配置したいか、正確に説明します
- フィット感に触れる:自然なフィット感とバランスを求めます
- 色を指定する:色合わせが重要な場合は、その旨を指定します
- コンテキストを含める:シーンやスタイルの目標に触れます
良いプロンプト:
- 「このネイビーのブレザーを着た私を、肩に自然にフィットするように見せて」
- 「このアイシャドウパレットを使って、夜のお出かけ向けのメイクにして」
- 「このメガネを私にかけて、顔の形に合わせて調整して」
効果の低いプロンプト:
- 「これを試して」(曖昧すぎます)
- 「服を着せて」(具体的なアイテムの指定がありません)
モードの選択
| モード | 説明 | 最適な用途 |
|---|---|---|
max | 最高品質で、詳細にレンダリング | 最終的なビジュアライゼーション、重要な判断 |
eco | より高速な処理で、十分な品質 | 手早いプレビュー、複数の選択肢の閲覧 |
# High quality for final decision
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Show me in this wedding dress with maximum detail"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/me.jpg", "https://example.com/dress.jpg"],
"mode": "max"
}'
# Quick preview mode
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Quick preview of this t-shirt on me"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/me.jpg", "https://example.com/tshirt.jpg"],
"mode": "eco"
}'
複数ターンのセッション
session_id を使うと、前のやり取りのコンテキストを維持しながら、連続したセッションで複数のアイテムを試せます。
セッションの開始
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "This is my photo. I want to try on several outfits for a job interview."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/my-photo.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
セッションの続行
# Try first outfit
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Now show me in this navy suit"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/navy-suit.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
# Try second outfit
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "How about this charcoal blazer with khakis instead?"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/charcoal-blazer.jpg", "https://example.com/khakis.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
# Compare options
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Which outfit looked more professional on me?"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "tryon-session-12345",
"mode": "max"
}'
エラー処理
よくある問題と解決策
| エラー | 原因 | 解決策 |
|---|---|---|
| 低品質の結果 | 入力画像の品質が低い | 解像度が高く、明るく照らされた写真を使用します |
| 配置が不正確 | 体の位置が不明瞭 | 対象箇所が見える正面向きの写真を使用します |
| 色が一致しない | 商品画像に色かぶりがある | 色を正確に再現した商品画像を使用します |
| アイテムが見えない | 画像内で商品が隠れている | 無地の背景に商品がはっきり写った画像を使用します |
API エラーへの対処
# Check response status and handle errors
response=$(curl -s -w "\n%{http_code}" -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Show me in this jacket"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/me.jpg", "https://example.com/jacket.jpg"],
"mode": "max"
}')
http_code=$(echo "$response" | tail -n 1)
body=$(echo "$response" | head -n -1)
if [ "$http_code" -eq 200 ]; then
echo "Success: $body"
elif [ "$http_code" -eq 401 ]; then
echo "Error: Invalid API key"
elif [ "$http_code" -eq 400 ]; then
echo "Error: Invalid request - check image URLs and parameters"
else
echo "Error $http_code: $body"
fi