用途
该技能用于从图片中移除背景,底层通过 inference.sh CLI(belt)调用 BiRefNet 模型完成高精度背景移除。输出结果为带透明背景的 PNG。
主要能力
- 使用 BiRefNet 模型进行背景移除。
- 通过 Reve 模型进行图像编辑,包括移除背景(生成透明背景)或直接替换背景。
- 可与图像生成模型串联,形成“先生成、后编辑”的工作流。
使用方式
需先安装 inference.sh CLI(belt),安装说明见官方文档。安装后登录:
belt login
使用 BiRefNet 移除背景:
belt app run infsh/birefnet --input '{"image_url": "https://your-photo.jpg"}'
使用 Reve 移除背景(生成透明背景):
belt app run falai/reve --input '{
"prompt": "remove the background, make it transparent",
"image_url": "https://portrait.jpg"
}'
使用 Reve 直接替换背景:
belt app run falai/reve --input '{
"prompt": "change the background to a beach",
"image_url": "https://product-photo.jpg"
}'
生成与编辑工作流示例:
# 1. Generate an image
belt app run falai/flux-dev-lora --input '{"prompt": "a cute robot mascot"}' > robot.json
# 2. Edit with Reve
belt app run falai/reve --input '{
"prompt": "remove background, transparent",
"image_url": "<url-from-step-1>"
}'
安装该技能本身:
npx skills add belt-sh/cli
适用场景
- 电商:清理商品照片。
- 人像:制作专业头像。
- 营销:为设计准备素材。
- 社交媒体:处理个人资料图片。
- 设计:为合成准备元素。
相关技能
# Full platform skill (all apps)
npx skills add inference-sh/skills@infsh-cli
# Image generation
npx skills add inference-sh/skills@ai-image-generation
# FLUX models (including inpainting)
npx skills add inference-sh/skills@flux-image
# Upscaling
npx skills add inference-sh/skills@image-upscaling
浏览所有图像类应用:
belt app list --category image
限制
资料未提供关于收费、价格、平台支持范围、处理速度或效果上限的具体说明,暂未提供。