用途
background-removal 是一个用于从图像中移除背景的技能,通过 inference.sh CLI(belt)调用模型完成。其核心模型为 BiRefNet,定位为高精度背景移除。
主要能力
- 使用 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" }' - 直接更换背景:
belt app run falai/reve --input '{ "prompt": "change the background to a beach", "image_url": "https://product-photo.jpg" }'
- 移除背景并使其透明:
- 输出:返回带透明背景的 PNG。
使用方式
- 安装技能:
npx skills add belt-sh/cli - 安装 inference.sh CLI(belt),安装说明见资料中的链接。
- 登录:
belt login - 运行应用,例如:
belt app run infsh/birefnet --input '{"image_url": "https://your-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>"
}'
适用场景
- 电商:清理产品照片
- 人像:专业头像
- 营销:设计素材
- 社交媒体:个人资料图片
- 设计:构图元素
相关技能
# 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
文档
- Running Apps - How to run apps via CLI
- Image Generation Example - Complete image workflow guide
- Apps Overview - Understanding the app ecosystem
限制
资料未提供关于收费、价格、平台兼容性、处理速度或效果保证的具体信息,暂未提供。