background-removal
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBackground Removal
背景去除
Remove backgrounds from images using each::sense. This skill creates professional cutouts with transparent backgrounds, replaces backgrounds with solid colors or scenes, and handles complex edges including hair and fur with precision.
使用 each::sense 去除图片背景。该工具可生成带透明背景的专业抠图效果,将背景替换为纯色或场景,还能精准处理包括头发、毛发在内的复杂边缘。
Features
功能特性
- Transparent PNG Export: Clean cutouts with alpha channel transparency
- Solid Color Replacement: Replace backgrounds with any solid color
- Scene Replacement: Place subjects in new environments
- Hair Detail Preservation: Advanced edge detection for fine details
- Complex Edge Handling: Accurate cutouts for difficult subjects
- Batch Processing: Remove backgrounds from multiple images
- E-commerce Ready: Product cutouts optimized for online stores
- Portrait Optimization: Professional headshots and profile photos
- 透明PNG导出:支持带alpha通道透明度的高清抠图
- 纯色背景替换:可将背景替换为任意纯色
- 场景背景替换:可将主体置入全新环境
- 发丝细节保留:采用先进边缘检测技术保留精细细节
- 复杂边缘处理:对高难度主体也能实现精准抠图
- 批量处理:可同时对多张图片进行背景去除
- 电商适配:适配线上店铺需求的产品抠图效果
- 人像优化:专业的头像和证件照处理效果
Quick Start
快速开始
bash
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": "Remove the background from this image and export as transparent PNG",
"image_urls": ["https://example.com/my-photo.jpg"],
"mode": "max"
}'bash
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": "Remove the background from this image and export as transparent PNG",
"image_urls": ["https://example.com/my-photo.jpg"],
"mode": "max"
}'Use Case Examples
使用案例示例
1. Product Background Removal
1. 产品背景去除
Clean cutouts for e-commerce product listings.
bash
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": "Remove the background from this product photo. Create a clean cutout with transparent background, preserving all product details and shadows. Output as PNG.",
"image_urls": ["https://example.com/product-shoe.jpg"],
"mode": "max"
}'为电商产品列表生成干净的抠图效果。
bash
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": "Remove the background from this product photo. Create a clean cutout with transparent background, preserving all product details and shadows. Output as PNG.",
"image_urls": ["https://example.com/product-shoe.jpg"],
"mode": "max"
}'2. Portrait Background Removal
2. 人像背景去除
Professional headshot cutouts for business or personal use.
bash
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": "Remove the background from this portrait photo. Preserve all hair details and create clean edges around the person. Export as transparent PNG for professional use.",
"image_urls": ["https://example.com/headshot.jpg"],
"mode": "max"
}'为商务或个人用途生成专业的头像抠图效果。
bash
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": "Remove the background from this portrait photo. Preserve all hair details and create clean edges around the person. Export as transparent PNG for professional use.",
"image_urls": ["https://example.com/headshot.jpg"],
"mode": "max"
}'3. Transparent PNG Export
3. 透明PNG导出
Export with alpha channel for use in design software.
bash
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": "Remove the background from this image and export as a high-quality transparent PNG. Ensure clean alpha channel edges suitable for compositing in Photoshop or Figma.",
"image_urls": ["https://example.com/object.jpg"],
"mode": "max"
}'导出带alpha通道的图片,可用于设计软件中。
bash
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": "Remove the background from this image and export as a high-quality transparent PNG. Ensure clean alpha channel edges suitable for compositing in Photoshop or Figma.",
"image_urls": ["https://example.com/object.jpg"],
"mode": "max"
}'4. Background Replacement with Solid Color
4. 纯色背景替换
Replace background with a specific solid color.
bash
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": "Remove the background from this product image and replace it with a pure white background (#FFFFFF). Keep the product shadows for a natural look.",
"image_urls": ["https://example.com/product.jpg"],
"mode": "max"
}'将背景替换为指定的纯色。
bash
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": "Remove the background from this product image and replace it with a pure white background (#FFFFFF). Keep the product shadows for a natural look.",
"image_urls": ["https://example.com/product.jpg"],
"mode": "max"
}'5. Background Replacement with Scene
5. 场景背景替换
Place subject in a completely new environment.
bash
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": "Remove the background from this person photo and place them in a modern office environment with soft natural lighting from large windows. Make it look natural and professional.",
"image_urls": ["https://example.com/person.jpg"],
"mode": "max"
}'将主体置入完全不同的新环境中。
bash
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": "Remove the background from this person photo and place them in a modern office environment with soft natural lighting from large windows. Make it look natural and professional.",
"image_urls": ["https://example.com/person.jpg"],
"mode": "max"
}'6. Hair Detail Preservation
6. 发丝细节保留
Handle complex hair edges with precision.
bash
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": "Remove the background from this portrait. Pay special attention to preserving fine hair details, flyaway strands, and wispy edges. The subject has curly hair that needs careful edge handling. Export as transparent PNG.",
"image_urls": ["https://example.com/curly-hair-portrait.jpg"],
"mode": "max"
}'精准处理复杂的头发边缘。
bash
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": "Remove the background from this portrait. Pay special attention to preserving fine hair details, flyaway strands, and wispy edges. The subject has curly hair that needs careful edge handling. Export as transparent PNG.",
"image_urls": ["https://example.com/curly-hair-portrait.jpg"],
"mode": "max"
}'7. Complex Edge Handling
7. 复杂边缘处理
Handle difficult subjects like fur, feathers, or translucent objects.
bash
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": "Remove the background from this image of a fluffy cat. Preserve all the fur details including the soft edges and individual hair strands. The cat has white fur which is challenging - maintain clean edges without halos.",
"image_urls": ["https://example.com/fluffy-cat.jpg"],
"mode": "max"
}'处理毛发、羽毛、半透明物体等高难度主体。
bash
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": "Remove the background from this image of a fluffy cat. Preserve all the fur details including the soft edges and individual hair strands. The cat has white fur which is challenging - maintain clean edges without halos.",
"image_urls": ["https://example.com/fluffy-cat.jpg"],
"mode": "max"
}'8. Batch Background Removal
8. 批量背景去除
Process multiple product images with consistent results.
bash
undefined处理多张产品图片,保证效果统一。
bash
undefinedFirst image in batch
批量处理第一张图片
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": "Remove the background from this product image. Export as transparent PNG with consistent edge quality.", "image_urls": ["https://example.com/product-1.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this product image. Export as transparent PNG with consistent edge quality.", "image_urls": ["https://example.com/product-1.jpg"], "session_id": "batch-background-removal-001", "mode": "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": "Remove the background from this product image. Export as transparent PNG with consistent edge quality.", "image_urls": ["https://example.com/product-1.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this product image. Export as transparent PNG with consistent edge quality.", "image_urls": ["https://example.com/product-1.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
Second image (same session for consistency)
第二张图片(使用同一会话保证效果统一)
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": "Remove the background from this product image with the same settings as before.", "image_urls": ["https://example.com/product-2.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this product image with the same settings as before.", "image_urls": ["https://example.com/product-2.jpg"], "session_id": "batch-background-removal-001", "mode": "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": "Remove the background from this product image with the same settings as before.", "image_urls": ["https://example.com/product-2.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this product image with the same settings as before.", "image_urls": ["https://example.com/product-2.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
Third image
第三张图片
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": "Remove the background from this product image, same approach.", "image_urls": ["https://example.com/product-3.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this product image, same approach.", "image_urls": ["https://example.com/product-3.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
undefinedcurl -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": "Remove the background from this product image, same approach.", "image_urls": ["https://example.com/product-3.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this product image, same approach.", "image_urls": ["https://example.com/product-3.jpg"], "session_id": "batch-background-removal-001", "mode": "eco" }'
undefined9. E-commerce Product Cutouts
9. 电商产品抠图
Amazon/Shopify-ready product images with white backgrounds.
bash
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": "Create an e-commerce ready product cutout from this image. Remove the background and replace with pure white. The product should be centered with clean edges. This is for Amazon/Shopify listing - must meet marketplace image requirements.",
"image_urls": ["https://example.com/product-handbag.jpg"],
"mode": "max"
}'生成适配Amazon/Shopify的白底产品图。
bash
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": "Create an e-commerce ready product cutout from this image. Remove the background and replace with pure white. The product should be centered with clean edges. This is for Amazon/Shopify listing - must meet marketplace image requirements.",
"image_urls": ["https://example.com/product-handbag.jpg"],
"mode": "max"
}'10. Social Media Profile Photos
10. 社交媒体头像
Create professional profile pictures with clean backgrounds.
bash
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": "Remove the background from this selfie and replace with a professional gradient background (dark blue to light blue). Preserve all hair details. This is for a LinkedIn profile photo - make it look polished and professional.",
"image_urls": ["https://example.com/selfie.jpg"],
"mode": "max"
}'生成背景干净的专业个人资料图片。
bash
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": "Remove the background from this selfie and replace with a professional gradient background (dark blue to light blue). Preserve all hair details. This is for a LinkedIn profile photo - make it look polished and professional.",
"image_urls": ["https://example.com/selfie.jpg"],
"mode": "max"
}'Multi-Turn Creative Iteration
多轮创意迭代
Use to refine background removal results:
session_idbash
undefined使用优化背景去除效果:
session_idbash
undefinedInitial removal
初次抠图
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": "Remove the background from this portrait photo", "image_urls": ["https://example.com/portrait.jpg"], "session_id": "portrait-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this portrait photo", "image_urls": ["https://example.com/portrait.jpg"], "session_id": "portrait-project-001" }'
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": "Remove the background from this portrait photo", "image_urls": ["https://example.com/portrait.jpg"], "session_id": "portrait-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Remove the background from this portrait photo", "image_urls": ["https://example.com/portrait.jpg"], "session_id": "portrait-project-001" }'
Refine the result
优化效果
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": "The hair edges look a bit rough. Can you refine them to be smoother and more natural?", "session_id": "portrait-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "The hair edges look a bit rough. Can you refine them to be smoother and more natural?", "session_id": "portrait-project-001" }'
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": "The hair edges look a bit rough. Can you refine them to be smoother and more natural?", "session_id": "portrait-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "The hair edges look a bit rough. Can you refine them to be smoother and more natural?", "session_id": "portrait-project-001" }'
Change background
更换背景
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 place this cutout on a beach sunset background", "session_id": "portrait-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Now place this cutout on a beach sunset background", "session_id": "portrait-project-001" }'
undefinedcurl -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 place this cutout on a beach sunset background", "session_id": "portrait-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Now place this cutout on a beach sunset background", "session_id": "portrait-project-001" }'
undefinedMode Selection
模式选择
Ask your users before generating:
"Do you want fast & cheap, or high quality?"
| Mode | Best For | Speed | Quality |
|---|---|---|---|
| Final production images, complex edges, hair details | Slower | Highest |
| Quick previews, batch processing, simple objects | Faster | Good |
生成前可询问用户:
「您需要快速低成本的效果,还是高质量的效果?」
| 模式 | 适用场景 | 速度 | 质量 |
|---|---|---|---|
| 最终生产用图、复杂边缘、发丝细节处理 | 较慢 | 最高 |
| 快速预览、批量处理、简单主体 | 较快 | 良好 |
Best Practices
最佳实践
For Products
产品类图片
- Lighting: Original image should have even lighting for best results
- Contrast: High contrast between product and background helps accuracy
- Shadows: Request shadow preservation for natural-looking results
- Resolution: Higher resolution input yields better edge quality
- 光照:原图光照均匀可获得最佳效果
- 对比度:产品和背景对比度高可提升抠图准确率
- 阴影:可要求保留阴影让效果更自然
- 分辨率:输入分辨率越高,边缘质量越好
For Portraits
人像类图片
- Hair: Mention hair type in prompt for better edge detection
- Clothing: Describe clothing edges if they blend with background
- Accessories: Note glasses, jewelry, or items that need preservation
- 头发:在提示词中说明头发类型可提升边缘检测效果
- 服装:如果服装和背景融色,可描述服装边缘特征
- 配饰:说明需要保留的眼镜、珠宝等物品
For Complex Subjects
复杂主体图片
- Transparency: Mention glass, smoke, or translucent elements
- Fine Details: Specify fur, feathers, or intricate patterns
- Multiple Subjects: Describe what should be kept vs removed
- 透明度:说明是否存在玻璃、烟雾、半透明元素
- 精细细节:注明需要保留的毛发、羽毛、复杂图案
- 多主体:说明需要保留和需要移除的内容
Prompt Tips
提示词技巧
When requesting background removal, include:
- Subject Type: Product, person, animal, object
- Edge Complexity: Simple edges vs hair/fur/fine details
- Output Format: Transparent PNG or replacement background
- Background Color: Specific hex code if replacing with solid color
- Use Case: E-commerce, social media, compositing, etc.
请求背景去除时,可包含以下内容:
- 主体类型:产品、人物、动物、物品
- 边缘复杂度:简单边缘,还是需要处理头发/毛发/精细细节
- 输出格式:透明PNG,还是替换背景
- 背景颜色:如果替换纯色背景,提供具体色号
- 使用场景:电商、社交媒体、合成创作等
Example Prompt Structure
提示词结构示例
"Remove the background from this [subject type].
[Specific edge requirements like hair or fur details].
Output as [transparent PNG / white background / specific scene].
This is for [use case] - [any specific requirements].""Remove the background from this [subject type].
[Specific edge requirements like hair or fur details].
Output as [transparent PNG / white background / specific scene].
This is for [use case] - [any specific requirements]."Error Handling
错误处理
| Error | Cause | Solution |
|---|---|---|
| Insufficient balance | Top up at eachlabs.ai |
| Poor edge quality | Low resolution input | Use higher resolution source image |
| Halos around edges | Complex background colors | Use |
| Timeout | Large image or complex processing | Set client timeout to minimum 10 minutes |
| 错误信息 | 原因 | 解决方案 |
|---|---|---|
| 余额不足 | 前往eachlabs.ai充值 |
| 边缘质量差 | 输入分辨率低 | 使用更高分辨率的源图片 |
| 边缘有光晕 | 背景颜色复杂 | 使用 |
| 请求超时 | 图片过大或处理逻辑复杂 | 将客户端超时时间设置为至少10分钟 |
Related Skills
相关技能
- - Core API documentation
each-sense - - Generate product images from scratch
product-photo-generation - - General image editing capabilities
image-edit
- - 核心API文档
each-sense - - 从零生成产品图片
product-photo-generation - - 通用图像编辑能力
image-edit