Background removal for batch images and brave webcam users
Wraps the InSPyReNet segmentation model in a CLI, GUI, and Python API to turn images and video into transparent layers.

What it does
transparent-background is a practical wrapper around InSPyReNet, a high-resolution salient-object-detection model from ACCV 2022. It ingests images, video files, or webcam streams and spits out alpha mattes, transparent PNGs, or composited frames. Under the hood it is essentially a deployment toolkit for a research checkpoint, handling download, resizing strategy, and optional foreground-color refinement.
The interesting bit
Most background-removal tools pretend the trade-off between sharp detail and temporal stability does not exist. This one exposes it directly through static and dynamic resize modes, letting you choose whether you want a conservative matte or a riskier high-res mask. That transparency is rare in a space crowded with black-box SaaS offerings.
Key highlights
- Built on InSPyReNet, a high-resolution salient-object-detection network.
- Ships with three interfaces: command line, importable Python API, and a Flet-based GUI.
- Supports custom model checkpoints via an external YAML config that points to Google Drive.
- Optional RGBA foreground estimation via
pymatting, with runtime GPU acceleration if CuPy or pyopencl is present. - Half a million PyPI downloads and a community ComfyUI node suggest it has become a default shortcut for many pipelines.
Caveats
- Small images fail with the default checkpoint; the
base-nightlymode is offered as a stopgap but may change without notice. - Webcam support is explicitly unstable and relegated to an optional extra.
- The tool downloads model checkpoints from Google Drive on first run, so an internet connection—or a correctly configured HTTP proxy—is required initially unless you manually stage the files.
Verdict
A solid choice for developers who need offline, batch background removal for images or video. Look elsewhere if you need reliable real-time webcam matting or consistent results on very low-resolution source material today.
Frequently asked
- What is plemeri/transparent-background?
- Wraps the InSPyReNet segmentation model in a CLI, GUI, and Python API to turn images and video into transparent layers.
- Is transparent-background open source?
- Yes — plemeri/transparent-background is open source, released under the MIT license.
- What language is transparent-background written in?
- plemeri/transparent-background is primarily written in Python.
- How popular is transparent-background?
- plemeri/transparent-background has 1.3k stars on GitHub.
- Where can I find transparent-background?
- plemeri/transparent-background is on GitHub at https://github.com/plemeri/transparent-background.