remove-bg
Skill3.1k starsChanged 2 months agoApache-2.0View on GitHub
图片去背景 / 抠图 / 换背景:用 AI 语义分割把主体从背景抠出,输出透明 PNG,或直接换成纯色(电商白底)/ 新场景背景。无需绿幕。当用户说 去背景、抠图、抠图换背景、去掉背景、透明背景、白底图、换背景、抠人像、抠产品、扣图、KO图、商品白底 时使用。基于 shared/scripts/remove_bg.py(rembg u2net)。与 green-screen 区别:green-screen 处理绿幕视频,本 SKILL 处理任意图片;与 ecom-details-image 区别:那个出电商视觉方案,本 SKILL 只做抠图。
1 other project uses a version of this.
Trending
Quiet since September.thin dataabout the whole repository
Most recently taken up by
- dawn840705/codex-code-studiostheir own version, first seen Aug 28, 2026
Who's talking about ZJU-REAL/Easel
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dawn840705/codex-code-studios★ 17same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository114 other files it gives its agents.
- skills/openclaw/skill-xhs-publisher/AGENTS.mdAGENTS.md
- ai-image-genSkill
- ai-musicSkill
- ai-video-genSkill
- asset-managerSkill
- audio-denoiseSkill
- audio-editingSkill
- audio-mixSkill
- audio-visualizerSkill
- auto-short-videoSkill
- auto-subtitleSkill
- batch-processSkill
- beat-sync-videoSkill
- card-designSkill
- card-quoteSkill
- card-xiaohongshuSkill
- chart-visualizationSkill
- clipifySkill
- comparison-cardSkill
- copywritingSkill
- data-reportSkill
- doc-convertSkill
- ecom-details-imageSkill
- green-screenSkill
- gzh-designSkill
- image-editingSkill
- image-enhanceSkill
- infographicSkill
- meme-generatorSkill
- mindmapSkill
- multi-voice-dubbingSkill
- novel-writerSkill
- paper-explainerSkill
- poster-heroSkill
- post-formatterSkill
- roi-calculatorSkill
- short-dramaSkill
- skill-account-diagnosisSkill
- skill-algorithm-updatesSkill
- skill-article-outlineSkill
- skill-audience-profilerSkill
- skill-bilibili-uploadSkill
- skill-brand-onboardingSkill
- skill-campaign-plannerSkill
- skill-carousel-plannerSkill
- skill-channels-uploadSkill
- skill-collab-proposalSkill
- skill-comment-insightsSkill
- skill-community-opsSkill
- skill-competitor-analysisSkill
- skill-content-calendar-logSkill
- skill-content-calendarSkill
- skill-content-gap-analysisSkill
- skill-content-matrixSkill
- skill-content-postmortemSkill
- skill-content-repurposingSkill
- skill-content-strategySkill
- skill-cross-platform-diffSkill
- skill-cross-platform-publishSkill
- skill-data-trackerSkill
- The first 60 shown.
The file
Files
图片去背景 / 抠图换背景
用 rembg(AI 语义分割)把主体抠出,输出透明 PNG 或换新背景。无需绿幕。全部走
skills/shared/scripts/remove_bg.py。
绿幕视频抠像见 green-screen;电商视觉方案见 ecom-details-image; 常规缩放/裁切/水印见 image-editing。
前置
首次运行自动下载模型(~4-170MB,视模型而定),需外网代理(脚本读 EASEL_PROXY/http(s)_proxy,未设则直连)。先自检:
python skills/shared/scripts/remove_bg.py check输入
| 字段 | 必填 | 说明 |
| 图片 | 是 | 要抠图的图片(没给就问) |
| 输出背景 | 否 | 透明(默认)/ 纯色 / 换图片背景 |
| 模型 | 否 | 通用 / 人像 / 精细,见下表 |
输出(outputs/主题名/)
- 抠好的图片(透明用
.png) - 报告:所用模型、背景形态
执行步骤
脚本路径(相对项目根):skills/shared/scripts/remove_bg.py(remove -h 看参数)。
# 透明背景(务必输出 .png)
python skills/shared/scripts/remove_bg.py remove -i product.jpg \
-o outputs/主题名/cutout.png
# 电商白底主图
python skills/shared/scripts/remove_bg.py remove -i product.jpg \
-o outputs/主题名/white.jpg --bg-color white
# 换新场景背景
python skills/shared/scripts/remove_bg.py remove -i person.jpg \
-o outputs/主题名/scene.png --bg-image scene.jpg
# 人像 + 毛发边缘细腻
python skills/shared/scripts/remove_bg.py remove -i portrait.jpg \
-o outputs/主题名/cut.png --model u2net_human_seg --alpha-matting模型选择
| 模型 | 适用 |
u2net(默认) | 通用主体 |
u2netp | 轻量快速(质量略低) |
u2net_human_seg | 人像专用 |
isnet-general-use | 更精细的通用分割 |
silueta | 体积小的通用模型 |
抠不干净/边缘毛糙时:换更精细的模型,或加 --alpha-matting(慢但边缘更好,适合头发/毛绒)。
规则
- 要透明背景必须输出 .png(jpg 不支持透明,脚本会自动改白底并提示)。
- 电商主图用
--bg-color white;换场景用--bg-image(自动等比覆盖裁切)。 - 人像优先
u2net_human_seg,商品/通用用u2net。 - 抠图质量取决于主体与背景对比度;复杂/低对比图无法保证完美。
- 产物统一进
outputs/主题名/。
参考来源
去背景用 rembg(u2net 系列显著性目标检测/分割模型)+ onnxruntime CPU 推理,是无 GPU 抠图的 主流方案。换背景合成用 Pillow alpha_composite。把模型加载、代理注入、背景合成封装成确定性脚本。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

