Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

rembg

$ rembg Community Med Risk
Daniel Gatis · AI & Media · MIT · macos / linux / windows

rembg removes image backgrounds locally using ONNX segmentation models via single-file (rembg i), batch-directory (rembg p), and HTTP server (rembg s) subcommands. Note that the first invocation downloads ~176 MB+ model weights into ~/.u2net/ unless pre-cached.

FCRS-1.0 Score
72 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
pip install "rembg[cpu,cli]"
CLI vs MCP Decision CLI Only

Local ONNX inference on image files (rembg i / rembg p) avoids sending images to external APIs or MCP servers.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 16 / 25

Click-based subcommands (i, p, s) support stdin/stdout and non-interactive flags, though lack JSON output, --dry-run, and quiet suppression for model download progress.

  • Non-interactive rembg i and rembg p subcommands
  • First-run model download prints progress bars to stdout/stderr
Trust & Safety 18 / 25

Requires distinct output path (rembg i in out), but silently triggers external HTTPS downloads of ~176 MB+ model files into ~/.u2net on first run.

  • Implicit network download of ONNX weights on first run per model
Setup & Portability 10 / 15

Heavy Python + ONNX Runtime + Pillow/SciPy dependency tree (rembg[cpu,cli]), not packaged in Homebrew core and sensitive to Python version compatibility.

  • Requires pip install "rembg[cpu,cli]" with heavy ML runtime dependencies
Utility & Efficiency 13 / 15

High-quality local background removal supporting U2Net, BiRefNet, and anime/human segmentation models plus batch directory mode (rembg p).

  • Supports multiple specialized segmentation models via -m
Maintenance & Lineage 8 / 10

Popular MIT-licensed repository (danielgatis/rembg) with ongoing model additions.

  • Maintained at danielgatis/rembg on GitHub
Docs & Verifiability 7 / 10

Clear README CLI examples and rembg <cmd> --help, though upstream model licensing must be checked separately.

  • Usage documented in GitHub README and --help

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; caches downloaded ONNX model weights in ~/.u2net (overridable via U2NET_HOME).

Side Effects
Read-Only Local Write
Cost & Quotas

Free MIT open-source Python CLI; individual ONNX model weights carry their own upstream licenses.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# rembg Agent Rules
- First run with a new `-m <model>` downloads ~176 MB+ ONNX weights from GitHub into `~/.u2net`—allow network or pre-populate `U2NET_HOME`.
- Always output `.png` or `.webp` so alpha transparency is preserved, and avoid `rembg s` server mode unless an HTTP daemon is explicitly needed.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect available rembg CLI subcommands and models
rembg i --help

Prints supported model names (u2net, isnet-general-use, birefnet-general) and alpha-matting flags without downloading weights.

Controlled Writes & Previews

Remove background from a single image
rembg i -m u2net input.jpg cutout.png

Segments foreground from input.jpg and writes a transparent RGBA PNG to cutout.png.

Strengths for Agents

  • + Runs state-of-the-art background segmentation (U2Net, BiRefNet) completely locally.
  • + Supports single-file (rembg i), stdin/stdout piping, and batch directory (rembg p) workflows.

Caveats & Pitfalls

  • ! First execution per model downloads large (~176 MB+) ONNX weights from GitHub into ~/.u2net.
  • ! Heavy Python/ONNX Runtime dependency tree with slower startup than native binaries.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI