← 返回
未分类

Bg Remove

智能识别并移除图片背景,支持多格式批量处理,输出带透明通道的PNG,可选本地或云端模型。
智能识图移除背景,支持多格式批量处理,输出透明PNG,可选本地或云端模型。
sxliuyu sxliuyu 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 472
下载
💾 0
安装
1
版本
#latest

概述

bg-remove

图片智能去背景工具,使用 RMBG-1.4 或 rembg 库实现高精度背景移除。

功能

  • 智能去背景: 使用 AI 模型自动识别并移除图片背景
  • 支持多种格式: PNG、JPG、WebP、BMP 等常见图片格式
  • 批量处理: 支持批量处理多张图片
  • 透明背景: 输出带透明通道的 PNG 图片
  • 支持本地模型: 可选择使用本地模型或默认模型

触发词

  • 去背景、移除背景、图片去背景
  • 抠图、去除图片背景、透明背景
  • bg-remove、remove background

使用方法

基本用法

# 去除单张图片背景
/bg-remove --input photo.jpg

# 指定输出路径
/bg-remove --input photo.jpg --output result.png

# 批量处理整个文件夹
/bg-remove --input ./photos --output ./output

# 使用特定模型
/bg-remove --input photo.jpg --model RMBG-1.4

高级选项

# 调整处理阈值 (0-1)
/bg-remove --input photo.jpg --threshold 0.5

# 保持原始文件名
/bg-remove --input ./photos --output ./output --keep-name

# 覆盖已存在的文件
/bg-remove --input photo.jpg --force

命令参数

参数简写说明默认值
------------------------
--input-i输入图片或文件夹路径必填
--output-o输出路径(文件或文件夹)同输入目录
--model-m使用的模型 (u2net/RMBG-1.4)u2net
--threshold-t分割阈值 (0-1)0.5
--keep-name-k保持原始文件名false
--force-f覆盖已存在的文件false
--alpha-matting-启用 Alpha Matting 增强边缘false
--alpha-matting-foreground-Alpha Matting 前景阈值240
--alpha-matting-background-Alpha Matting 背景阈值10

输出说明

  • 输出格式为 PNG,支持透明通道
  • 文件名默认添加 _nobg 后缀
  • 处理后的图片可直接用于设计、电商、产品展示等场景

示例

# 电商产品图去背景
/bg-remove --input ./product.jpg --output ./product_nobg.png

# 批量处理证件照背景
/bg-remove --input ./photos/ --output ./results/

# 人像照片去背景
/bg-remove --input portrait.jpg --model RMBG-1.4 --alpha-matting

依赖

  • Python 3.8+
  • rembg
  • pillow
  • onnxruntime

首次使用会自动下载模型文件。

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-02 13:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 430 📥 117,021
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 331 📥 93,896
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 218 📥 47,758