npx skills add https://github.com/eachlabs/skills --skill 'Virtual Try-On'基于 AI 的虚拟试穿解决方案,允许用户无需实际试穿即可可视化服装、配饰、妆容和发型在他们身上的效果。
虚拟试穿技能利用 each::sense API 提供以下内容的逼真可视化:
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing this dress",
"image_urls": [
"https://example.com/person-photo.jpg",
"https://example.com/dress-product.jpg"
],
"mode": "max"
}'
| 类别 | 描述 | 示例物品 |
|---|---|---|
| 服装 | 服装和衣物 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 衬衫、连衣裙、夹克、裤子、外套 |
| 鞋子 | 鞋类 | 运动鞋、高跟鞋、靴子、凉鞋、乐福鞋 |
| 眼镜 | 眼镜 | 处方眼镜、太阳镜、老花镜 |
| 珠宝 | 装饰性配饰 | 项链、耳环、手镯、戒指 |
| 妆容 | 化妆品 | 口红、眼影、粉底、腮红 |
| 发型 | 发型修改 | 发型、发色、造型 |
| 手表 | 腕表 | 模拟手表、智能手表、豪华手表 |
可视化特定服装在人物身上的效果。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing this blue blazer. Keep my face and body proportions accurate.",
"image_urls": [
"https://example.com/my-photo.jpg",
"https://example.com/blue-blazer.jpg"
],
"mode": "max"
}'
虚拟试戴不同款式的眼镜。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Put these round tortoiseshell glasses on me. Make sure the fit looks natural on my face shape.",
"image_urls": [
"https://example.com/face-photo.jpg",
"https://example.com/tortoiseshell-glasses.jpg"
],
"mode": "max"
}'
可视化项链、耳环或手镯等珠宝物品。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing this gold necklace. Position it naturally on my neckline.",
"image_urls": [
"https://example.com/portrait-photo.jpg",
"https://example.com/gold-necklace.jpg"
],
"mode": "max"
}'
试戴手表,查看其佩戴在手腕上的效果。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Put this luxury watch on my wrist. Show how it looks from a natural angle.",
"image_urls": [
"https://example.com/wrist-photo.jpg",
"https://example.com/luxury-watch.jpg"
],
"mode": "max"
}'
应用虚拟妆容或特定化妆品。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Apply this red lipstick shade to my lips. Keep the rest of my makeup natural.",
"image_urls": [
"https://example.com/face-closeup.jpg",
"https://example.com/red-lipstick-product.jpg"
],
"mode": "max"
}'
尝试不同的发型和发色。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Give me this bob haircut style. Match the hair color to the reference image.",
"image_urls": [
"https://example.com/my-current-photo.jpg",
"https://example.com/bob-hairstyle-reference.jpg"
],
"mode": "max"
}'
可视化不同鞋类的穿着效果。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing these white sneakers. Display a full body view.",
"image_urls": [
"https://example.com/full-body-photo.jpg",
"https://example.com/white-sneakers.jpg"
],
"mode": "max"
}'
使用多件服装打造完整造型。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Style me in this complete outfit - the jacket, pants, and shoes together. Create a cohesive look.",
"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"
}'
组合多种配饰打造完整造型。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Put these sunglasses and this scarf on me together. Make the accessories complement each other.",
"image_urls": [
"https://example.com/portrait.jpg",
"https://example.com/aviator-sunglasses.jpg",
"https://example.com/silk-scarf.jpg"
],
"mode": "max"
}'
为特定场合打造造型。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Dress me for a formal wedding. Use this evening gown and add elegant jewelry to complete the look.",
"image_urls": [
"https://example.com/my-photo.jpg",
"https://example.com/evening-gown.jpg",
"https://example.com/pearl-earrings.jpg"
],
"mode": "max"
}'
image_urls 参数接受一个图像 URL 数组用于虚拟试穿:
| 位置 | 用途 | 要求 |
|---|---|---|
| 第一张图像 | 人物照片 | 人物清晰、光线良好的照片 |
| 第二张图像 | 产品/物品照片 | 中性背景上的清晰产品图像 |
| 附加图像 | 多个产品 | 用于在一次试穿中组合多个物品 |
人物照片要求 :
产品照片要求 :
好的提示词示例 :
效果较差的提示词示例 :
| 模式 | 描述 | 最适合 |
|---|---|---|
max | 最高质量,详细渲染 | 最终可视化,重要决策 |
eco | 处理速度更快,质量良好 | 快速预览,浏览多个选项 |
# 用于最终决策的高质量模式
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me in this wedding dress with maximum detail",
"image_urls": ["https://example.com/me.jpg", "https://example.com/dress.jpg"],
"mode": "max"
}'
# 快速预览模式
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Quick preview of this t-shirt on me",
"image_urls": ["https://example.com/me.jpg", "https://example.com/tshirt.jpg"],
"mode": "eco"
}'
使用 session_id 在连续会话中尝试多个物品,保持先前交互的上下文。
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "This is my photo. I want to try on several outfits for a job interview.",
"image_urls": ["https://example.com/my-photo.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
# 尝试第一套服装
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Now show me in this navy suit",
"image_urls": ["https://example.com/navy-suit.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
# 尝试第二套服装
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "How about this charcoal blazer with khakis instead?",
"image_urls": ["https://example.com/charcoal-blazer.jpg", "https://example.com/khakis.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
# 比较选项
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Which outfit looked more professional on me?",
"session_id": "tryon-session-12345",
"mode": "max"
}'
| 错误 | 原因 | 解决方案 |
|---|---|---|
| 结果质量低 | 输入图像质量差 | 使用更高分辨率、光线更好的照片 |
| 放置位置不正确 | 身体姿势不清晰 | 使用正面照片,目标区域可见 |
| 颜色不匹配 | 产品图像存在色偏 | 使用颜色准确的产品图像 |
| 物品不可见 | 图像中产品被遮挡 | 使用中性背景上的清晰产品图像 |
# 检查响应状态并处理错误
response=$(curl -s -w "\n%{http_code}" -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me in this jacket",
"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
每周安装次数
–
代码仓库
GitHub 星标数
8
首次出现时间
–
安全审计
AI-powered virtual try-on solution that allows users to visualize how clothing, accessories, makeup, and hairstyles look on them without physically trying items on.
The Virtual Try-On skill leverages each::sense API to provide realistic visualization of:
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing this dress",
"image_urls": [
"https://example.com/person-photo.jpg",
"https://example.com/dress-product.jpg"
],
"mode": "max"
}'
| Category | Description | Example Items |
|---|---|---|
| Clothing | Apparel and garments | Shirts, dresses, jackets, pants, coats |
| Shoes | Footwear | Sneakers, heels, boots, sandals, loafers |
| Glasses | Eyewear | Prescription glasses, sunglasses, reading glasses |
| Jewelry | Decorative accessories | Necklaces, earrings, bracelets, rings |
| Makeup | Cosmetic products | Lipstick, eyeshadow, foundation, blush |
| Hairstyles | Hair modifications | Haircuts, hair colors, styling |
| Watches | Wristwear | Analog watches, smartwatches, luxury watches |
Visualize how a specific clothing item looks on a person.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing this blue blazer. Keep my face and body proportions accurate.",
"image_urls": [
"https://example.com/my-photo.jpg",
"https://example.com/blue-blazer.jpg"
],
"mode": "max"
}'
Try on different eyewear styles virtually.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Put these round tortoiseshell glasses on me. Make sure the fit looks natural on my face shape.",
"image_urls": [
"https://example.com/face-photo.jpg",
"https://example.com/tortoiseshell-glasses.jpg"
],
"mode": "max"
}'
Visualize jewelry items like necklaces, earrings, or bracelets.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing this gold necklace. Position it naturally on my neckline.",
"image_urls": [
"https://example.com/portrait-photo.jpg",
"https://example.com/gold-necklace.jpg"
],
"mode": "max"
}'
Try on watches to see how they fit your wrist.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Put this luxury watch on my wrist. Show how it looks from a natural angle.",
"image_urls": [
"https://example.com/wrist-photo.jpg",
"https://example.com/luxury-watch.jpg"
],
"mode": "max"
}'
Apply virtual makeup looks or specific cosmetic products.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Apply this red lipstick shade to my lips. Keep the rest of my makeup natural.",
"image_urls": [
"https://example.com/face-closeup.jpg",
"https://example.com/red-lipstick-product.jpg"
],
"mode": "max"
}'
Experiment with different hairstyles and hair colors.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Give me this bob haircut style. Match the hair color to the reference image.",
"image_urls": [
"https://example.com/my-current-photo.jpg",
"https://example.com/bob-hairstyle-reference.jpg"
],
"mode": "max"
}'
Visualize how different footwear looks.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me wearing these white sneakers. Display a full body view.",
"image_urls": [
"https://example.com/full-body-photo.jpg",
"https://example.com/white-sneakers.jpg"
],
"mode": "max"
}'
Create a complete look with multiple clothing items.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Style me in this complete outfit - the jacket, pants, and shoes together. Create a cohesive look.",
"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"
}'
Combine multiple accessories for a complete look.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Put these sunglasses and this scarf on me together. Make the accessories complement each other.",
"image_urls": [
"https://example.com/portrait.jpg",
"https://example.com/aviator-sunglasses.jpg",
"https://example.com/silk-scarf.jpg"
],
"mode": "max"
}'
Create looks for specific occasions.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Dress me for a formal wedding. Use this evening gown and add elegant jewelry to complete the look.",
"image_urls": [
"https://example.com/my-photo.jpg",
"https://example.com/evening-gown.jpg",
"https://example.com/pearl-earrings.jpg"
],
"mode": "max"
}'
The image_urls parameter accepts an array of image URLs for virtual try-on:
| Position | Purpose | Requirements |
|---|---|---|
| First image | Person photo | Clear, well-lit photo of the person |
| Second image | Product/item photo | Clear product image on neutral background |
| Additional images | Multiple products | For combining multiple items in one try-on |
Person Photo Requirements :
Product Photo Requirements :
Good Prompts :
Less Effective Prompts :
| Mode | Description | Best For |
|---|---|---|
max | Highest quality, detailed rendering | Final visualizations, important decisions |
eco | Faster processing, good quality | Quick previews, browsing multiple options |
# High quality for final decision
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me in this wedding dress with maximum detail",
"image_urls": ["https://example.com/me.jpg", "https://example.com/dress.jpg"],
"mode": "max"
}'
# Quick preview mode
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Quick preview of this t-shirt on me",
"image_urls": ["https://example.com/me.jpg", "https://example.com/tshirt.jpg"],
"mode": "eco"
}'
Use session_id to try multiple items in a continuous session, maintaining context from previous interactions.
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "This is my photo. I want to try on several outfits for a job interview.",
"image_urls": ["https://example.com/my-photo.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
# Try first outfit
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Now show me in this navy suit",
"image_urls": ["https://example.com/navy-suit.jpg"],
"session_id": "tryon-session-12345",
"mode": "max"
}'
# Try second outfit
curl -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "How about this charcoal blazer with khakis instead?",
"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://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Which outfit looked more professional on me?",
"session_id": "tryon-session-12345",
"mode": "max"
}'
| Error | Cause | Solution |
|---|---|---|
| Low quality result | Poor input image quality | Use higher resolution, well-lit photos |
| Incorrect placement | Unclear body positioning | Use front-facing photos with visible target area |
| Color mismatch | Product image has color cast | Use product images with accurate color representation |
| Item not visible | Product obscured in image | Use clear product images on neutral backgrounds |
# Check response status and handle errors
response=$(curl -s -w "\n%{http_code}" -X POST "https://sense.eachlabs.run/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"message": "Show me in this jacket",
"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
Weekly Installs
–
Repository
GitHub Stars
8
First Seen
–
Security Audits
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
43,500 周安装