mcpField
P
portrait-enhancement

portrait-enhancement

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

关于 portrait-enhancement

portrait-enhancement 是基于 each::sense 的人像照片修饰技能,适合摄影师、内容创作者及需要润色照片的人。它可分别调整肤质、眼睛、光线和背景虚化,并通过提示词引导生成自然效果。

主要功能

  1. 01保留肤质纹理的皮肤修饰
  2. 02美白牙齿与增强眼部
  3. 03瑕疵清除和光线调整
  4. 04背景虚化与头发优化
  5. 05妆容增强和轻度减龄
  6. 06多步骤人像润色

适用场景

  1. 01润色企业头像
  2. 02修饰社交媒体人像
  3. 03批量统一处理多张人像

安装

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

$npx skills add https://github.com/eachlabs/skills --skill portrait-enhancement

安装后在 Claude Code 中输入/portrait-enhancement确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

肖像增强

使用 each::sense 通过专业级 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": "Enhance this portrait with natural skin smoothing and subtle teeth whitening"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/portrait.jpg"]
  }'

API 配置

设置值
端点POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
Content-Typeapplication/json
Accepttext/event-stream
客户端超时至少 10 分钟

模式选择

生成前询问用户:

“您想要快速且低成本,还是高质量?”

模式适用场景速度质量
max最终交付成果、客户项目、可直接印刷的作品较慢最高
eco快速预览、批量处理、草稿较快良好

使用案例示例

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": "Apply natural skin smoothing to this portrait. Keep the skin texture realistic, reduce visible pores and fine lines, but avoid the plastic look. Maintain skin detail around eyes and lips."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/portrait.jpg"]
  }'
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": "Whiten the teeth in this portrait photo. Make them bright but natural looking - not Hollywood white. Remove any yellow or staining while keeping the natural tooth shape and texture."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/smile-portrait.jpg"]
  }'
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": "Enhance the eyes in this portrait. Brighten the whites, add subtle catchlights, increase iris clarity and color vibrancy, and reduce any redness or dark circles under the eyes. Keep it natural."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/headshot.jpg"]
  }'
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": "Remove blemishes from this portrait including acne spots, small scars, and any temporary skin imperfections. Keep moles and natural beauty marks. Preserve the natural skin texture in treated areas."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/portrait-blemishes.jpg"]
  }'
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": "Fix the lighting in this portrait. It was taken in harsh midday sun with unflattering shadows. Apply soft studio-style lighting with gentle shadows, reduce harsh highlights on the forehead, and add subtle rim lighting for depth."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/harsh-light-portrait.jpg"]
  }'
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": "Add a professional bokeh effect to this portrait. Blur the background with a smooth, creamy quality like an 85mm f/1.4 lens. Keep the subject perfectly sharp including hair edges. The blur should gradually increase with distance from the subject."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/portrait-busy-background.jpg"]
  }'
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": "Enhance the hair in this portrait. Add natural-looking shine and healthy luster, tame flyaway hairs, add subtle volume at the crown, and make the hair color more vibrant. Keep the overall hairstyle unchanged."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/portrait-hair.jpg"]
  }'
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": "Enhance the makeup in this portrait photo. Add subtle contouring to define cheekbones, slightly darken and define the eyebrows, add a soft natural lip color, and apply light mascara effect to the lashes. Keep everything looking natural and not overdone."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/natural-portrait.jpg"]
  }'
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": "Apply subtle age reduction to this portrait. Soften fine lines and wrinkles, reduce sagging under the eyes, lift the corners of the mouth slightly, and add a healthy glow to the skin. The result should look natural - like a well-rested version, not like a different person."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/mature-portrait.jpg"]
  }'
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": "Give this portrait a complete professional polish suitable for a corporate headshot. Apply natural skin smoothing, subtle teeth whitening, eye enhancement with catchlights, blemish removal, soft studio lighting, gentle background blur, and hair touch-up. The final result should look polished but authentic - suitable for LinkedIn or company website."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/corporate-portrait.jpg"]
  }'

多轮增强工作流

使用 session_id 逐步优化肖像增强效果:

# Initial enhancement
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": "Start with basic skin smoothing on this portrait"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "portrait-retouch-001",
    "image_urls": ["https://example.com/portrait.jpg"]
  }'

# Add teeth whitening
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 add subtle teeth whitening to the result"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "portrait-retouch-001"
  }'

# Add eye enhancement
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": "Enhance the eyes - brighten and add catchlights"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "portrait-retouch-001"
  }'

# Final background blur
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": "Finally, add a gentle background blur for a professional look"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "portrait-retouch-001"
  }'

批量处理多张肖像

以一致的增强效果处理多张肖像:

# Portrait 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": "Professional headshot retouch: natural skin smoothing, eye brightening, subtle background blur"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "image_urls": ["https://example.com/team-member-1.jpg"]
  }'

# Portrait 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": "Professional headshot retouch: natural skin smoothing, eye brightening, subtle background blur"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "image_urls": ["https://example.com/team-member-2.jpg"]
  }'

# Portrait 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": "Professional headshot retouch: natural skin smoothing, eye brightening, subtle background blur"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "image_urls": ["https://example.com/team-member-3.jpg"]
  }'

肖像增强提示词技巧

请求增强肖像时,请包含以下细节:

  1. 具体增强项目:要增强的具体内容(皮肤、眼睛、牙齿等)
  2. 强度级别:轻微、中等或显著
  3. 自然效果:强调结果应保持真实自然
  4. 需要保留的区域:应保持不变的特征
  5. 使用场景:头像、社交媒体、印刷品等
提示词结构示例
"Apply [enhancement type] to this portrait.
[Specific instructions for the enhancement].
Keep [what to preserve].
The result should look [desired outcome] for [use case]."

最佳实践

保持真实自然
  • 始终在提示词中注明“自然”或“真实”
  • 平滑皮肤时,要求保留皮肤纹理
  • 避免牙齿过度美白或眼睛过度提亮
  • 在专业场景中,增强效果应保持细腻
保留个人特征
  • 不要要求改变面部结构
  • 保留自然的美人痣和鲜明特征
  • 保持整张图像中的肤色一致
  • 保持自然比例
技术注意事项
  • 使用高分辨率源图像,以获得最佳效果
  • 初始光线良好的图像增强效果更佳
  • 正面肖像最适合大多数增强项目
  • 支持 JPG 和 PNG 格式

错误处理

错误原因解决方案
Failed to create prediction: HTTP 422余额不足在 eachlabs.ai 充值
违反内容政策内容违规确保肖像内容恰当
超时增强处理复杂将客户端超时时间设为至少 10 分钟
未检测到人脸人脸不可见提供清晰且人脸可见的肖像

相关技能

  • each-sense - 核心 API 文档
  • face-swap - 换脸功能
  • image-edit - 通用图像编辑
  • image-generation - 从头生成新肖像

评论

支持 Markdown