remove-background
Skill4 starsChanged 54 days agoMITView on GitHub
Remove image backgrounds locally with the BiRefNet segmentation model, writing a transparent PNG. Use when asked to remove or cut out a background, isolate a subject, or make a transparent version of a photo. No API key.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- imMamdouhaboammar/motion-graphics-skillstheir own version, first seen Nov 1, 2026
- pilioai/skillstheir own version, first seen Jul 26, 2026
- giarld/skillstheir own version, first seen Jul 8, 2026
- Bria-AI/bria-skilltheir own version, first seen Mar 5, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- Bria-AI/bria-skill★ 74same name
- imMamdouhaboammar/motion-graphics-skills★ 50same name
- pilioai/skills★ 43same name
- giarld/skills★ 8same 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 repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- ai-writing-detectorSkill
- animate-svgSkill
- browserbaseSkill
- clickhouseSkill
- commitSkill
- geist-designSkill
- generate-faviconSkill
- generate-imageSkill
- google-indexingSkill
- google-search-consoleSkill
- google-searchSkill
- humanizerSkill
- keyword-researchSkill
- parallelSkill
- reviewSkill
- web-uiSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
No API key. First run is expensive: uv builds a ~790 MB environment (torch, torchvision, transformers, timm, kornia) and downloads ~445 MB …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Remove Background
Local BiRefNet segmentation (ZhengPeng7/BiRefNet) on CUDA, MPS or CPU. Output is always RGBA PNG.
Requirements
No API key. First run is expensive: uv builds a ~790 MB environment (torch, torchvision, transformers, timm, kornia) and downloads ~445 MB of model weights to ~/.cache/huggingface. Both are cached; later runs start in seconds.
Command
./scripts/remove_background <input_image> [options] # single command, no subcommandOptions
| Option | Description |
-o, --output | Output path (default {name}_nobg.png) |
-d, --device | Force cuda | mps | cpu (default auto: CUDA > MPS > CPU) |
-c, --crop | Crop to the foreground bounding box |
-p, --padding | Padding around the crop, px (default 0) |
-f, --format | json (default) or table |
Output
JSON: input, output, device, original_size, output_size, cropped, model, plus crop_box when a box was found.
Gotchas
- The saved file is always PNG whatever extension
-ogets;-fis the stdout report format, not the image format. - Inference resizes to 1024x1024 and scales the mask back up, so large images lose edge detail.
croppedechoes the-cflag, not whether a crop happened. A fully opaque image yields no bbox:crop_boxis absent and nothing is cropped.- MPS falls back to CPU for unsupported ops (
PYTORCH_ENABLE_MPS_FALLBACK=1is set); use-d cpuif MPS misbehaves.
Examples
./scripts/remove_background photo.jpg
./scripts/remove_background photo.jpg -c -p 20 -o cutout.png
./scripts/remove_background photo.jpg -d cpu -f tableDoes 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.

