mcpField
D
digital-twin-generation

digital-twin-generation

github.com/eachlabs创意与媒体44282 次安装今天更新
代码仓库

关于 digital-twin-generation

digital-twin-generation 使用 each::sense 根据参考照片生成真实人物的数字分身,可用于视频通话、企业传播和多语言内容。支持头像、全身形象及动画视频,并可通过会话迭代调整。

主要功能

  1. 01根据参考照片生成数字分身
  2. 02创建写实头像及全身形象
  3. 03生成带自然表情的分身
  4. 04制作分身动画视频
  5. 05使用 session_id 迭代并保持形象一致

适用场景

  1. 01为视频会议制作人物形象
  2. 02制作企业发言人或客服虚拟形象
  3. 03创建多语言视频内容中的人物形象

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill digital-twin-generation

安装后在 Claude Code 中输入/digital-twin-generation确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

数字孪生生成

使用 each::sense 生成逼真的数字孪生和虚拟形象克隆。本技能可创建由 AI 驱动的真人数字化形象,用于视频通话、企业沟通、客户服务和多语言内容交付。

功能

  • 基于照片的数字孪生:根据参考照片创建数字克隆
  • 逼真的虚拟形象:生成栩栩如生的虚拟形象
  • 视频通话数字孪生:针对虚拟会议优化的数字孪生
  • 企业发言人:用于品牌沟通的专业数字代表
  • 客户服务虚拟形象:用于客服互动的统一 AI 代表
  • 多语言数字孪生:能够说多种语言的数字孪生
  • 富有表现力的数字孪生:具有自然面部表情和情绪的虚拟形象
  • 全身数字孪生:包含身体和手势的完整数字化形象
  • 动画视频:通过视频生成让数字孪生栩栩如生
  • 跨平台一致性:在所有平台上保持相同的外观

快速入门

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": "Create a photorealistic digital twin from these reference photos. Generate a professional headshot suitable for corporate use."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/person-photo1.jpg", "https://example.com/person-photo2.jpg"],
    "mode": "max"
  }'

数字孪生应用场景

应用场景描述推荐照片
视频通话虚拟会议形象3-5 张正面照片
企业发言人品牌沟通5-10 张专业照片
客户服务客服虚拟形象3-5 张表情自然的照片
多语言内容翻译后的视频内容5 张以上不同角度的照片
社交媒体统一的线上形象5-10 张多样化照片
培训视频教育内容交付5 张以上带有不同表情的照片

应用场景示例

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": "Create a digital twin from these reference photos. The twin should capture the exact likeness, skin tone, and facial features. Generate a high-quality portrait with professional studio lighting on a neutral gray background."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/reference-front.jpg",
      "https://example.com/reference-angle.jpg",
      "https://example.com/reference-side.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": "Generate a photorealistic avatar clone from these photos. The avatar should be indistinguishable from a real photograph. Include fine details like skin texture, hair strands, and eye reflections. Output as a 1:1 square format suitable for profile pictures."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/subject-photo1.jpg",
      "https://example.com/subject-photo2.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": "Create a digital twin optimized for video calls. The twin should look natural in a home office setting with soft natural lighting. Include a subtle depth-of-field blur on the background. The person should have a friendly, approachable expression suitable for professional meetings."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/ceo-headshot.jpg",
      "https://example.com/ceo-casual.jpg"
    ],
    "mode": "max",
    "session_id": "videocall-twin-001"
  }'
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": "Create a corporate spokesperson digital twin from these executive photos. The twin should appear authoritative yet approachable. Professional business attire, confident posture, clean corporate background with subtle brand colors (navy blue). Suitable for investor presentations and company announcements."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/exec-professional.jpg",
      "https://example.com/exec-speaking.jpg",
      "https://example.com/exec-portrait.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": "Generate a customer service avatar digital twin. The avatar should have a warm, helpful expression with a genuine smile. Professional but approachable appearance. Clean, minimal background. The twin will be used for chat support and help desk interfaces, so it should feel trustworthy and friendly."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/support-rep-photo.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": "Create a digital twin for multilingual video content. Generate the twin with a neutral mouth position that works well for lip-sync dubbing. Include multiple angles: front-facing, slight left turn, and slight right turn. The lighting should be even and consistent to ensure seamless video dubbing across different languages."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/presenter-front.jpg",
      "https://example.com/presenter-left.jpg",
      "https://example.com/presenter-right.jpg"
    ],
    "mode": "max",
    "session_id": "multilingual-twin-project"
  }'
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": "Create a digital twin with multiple expressions from these reference photos. Generate 4 variations: 1) Neutral professional expression, 2) Warm genuine smile, 3) Thoughtful/listening expression, 4) Enthusiastic/excited expression. All variations should maintain perfect identity consistency."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/person-neutral.jpg",
      "https://example.com/person-smiling.jpg",
      "https://example.com/person-serious.jpg"
    ],
    "mode": "max",
    "session_id": "expressive-twin-set"
  }'
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": "Generate a full-body digital twin from these reference photos. Include accurate body proportions, clothing style, and natural standing posture. The twin should be shown in a professional presentation pose with hands visible. Full-length view suitable for virtual events and digital stage presentations."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/fullbody-front.jpg",
      "https://example.com/fullbody-side.jpg",
      "https://example.com/headshot-detail.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": "Create a 10-second animated video of my digital twin. The twin should appear to be speaking naturally with subtle head movements and natural blinking. Professional office background with soft lighting. The animation should loop seamlessly for use as a video call placeholder."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/my-photo-front.jpg",
      "https://example.com/my-photo-speaking.jpg"
    ],
    "mode": "max"
  }'
10. 跨平台一致的数字孪生

创建多种格式的数字孪生版本,以保持跨平台一致性。

# Initial twin creation
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": "Create a digital twin master image from these photos. This will be the base for generating consistent avatars across multiple platforms. High resolution, neutral background, perfect lighting for easy adaptation."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": [
      "https://example.com/master-photo1.jpg",
      "https://example.com/master-photo2.jpg",
      "https://example.com/master-photo3.jpg"
    ],
    "mode": "max",
    "session_id": "cross-platform-twin"
  }'

# LinkedIn format (1:1 square)
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": "Using the digital twin we just created, generate a 1:1 square format version optimized for LinkedIn. Professional appearance with a subtle corporate background."}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "cross-platform-twin"
  }'

# Twitter/X format (circular crop friendly)
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": "Generate a circular-crop-friendly version of the twin for Twitter/X profile. Center the face with enough margin for circular cropping. Slightly more casual than LinkedIn."}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "cross-platform-twin"
  }'

# Video thumbnail format (16: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": "Create a 16:9 landscape version of the twin suitable for YouTube thumbnails and video call backgrounds. Position the twin on the right third with space for text on the left."}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "cross-platform-twin"
  }'

最佳实践

参考照片指南
  • 数量:提供 3-10 张参考照片,以获得最佳效果
  • 角度:尽可能包含正面、3/4 侧面和侧面视图
  • 光线:使用光线充足、没有强烈阴影的照片
  • 分辨率:分辨率越高,生成的数字孪生效果越好
  • 一致性:照片应展示同一个人,且年龄相近
  • 表情:加入多种表情,以生成富有表现力的数字孪生
质量优化
  • 模式选择:最终素材使用 max,快速原型制作使用 eco
  • 迭代优化:使用 session_id,通过多次请求优化数字孪生
  • 具体细节:准确描述光线、背景和表情要求
  • 格式说明:始终指定宽高比和预期用途
身份一致性
  • 会话连续性:同一个数字分身的所有变体都使用相同的 session_id
  • 参考锚定:请求生成变体时附上原始照片
  • 风格锁定:描述各次请求中保持一致的元素(光线、背景)

模式选择

生成前询问用户:

“你想要速度快、成本低,还是质量高?”

模式最适合速度质量
max最终数字分身、生产素材较慢最高
eco快速预览、探索概念较快良好

多轮数字分身开发

使用 session_id 迭代开发和优化数字分身:

# Initial twin generation
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": "Create a digital twin from these photos for corporate communications"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/ceo-photo1.jpg", "https://example.com/ceo-photo2.jpg"],
    "mode": "max",
    "session_id": "ceo-digital-twin"
  }'

# Refine based on feedback
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": "Make the expression slightly more serious and add subtle rim lighting for more dimension"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "ceo-digital-twin"
  }'

# Generate variations
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": "Create 3 variations with different backgrounds: 1) Modern office, 2) Gradient blue, 3) Pure white"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "ceo-digital-twin"
  }'

错误处理

错误原因解决方案
Failed to create prediction: HTTP 422余额不足在 eachlabs.ai 充值
内容政策违规内容被禁止确保照片已获得适当授权
超时生成内容过于复杂将客户端超时设置为至少 10 分钟
输出质量低参考照片质量差提供质量更高、光线更好的照片

隐私与授权

创建数字分身时,请确保:

  • 已获得被克隆者的明确同意
  • 数字分身仅用于授权用途
  • 生成的内容符合适用的法律法规
  • 在有要求时,明确披露深度伪造/合成媒体内容

相关技能

  • each-sense - 核心 API 文档
  • face-swap - 替换现有图像中的面部
  • video-generation - 根据图像创建视频
  • image-generation - 通用图像生成

评论

支持 Markdown