rembg

A local AI background removal tool using ONNX models, with CPU, NVIDIA and AMD GPU support and a self-hosted HTTP server.

Alternative to:

rembg removes image backgrounds on your own hardware for cutouts and automated image workflows. Its local ONNX models keep image processing on your machine after the initial model download.

  • Workflow integration: A command-line tool, Python library, HTTP server and Docker support let you add background removal to scripts or self-hosted services.
  • Model choice: The default bria-rmbg model produces softer edges but runs more slowly than u2net; specialist choices include birefnet-portrait for portraits and isnet-anime for anime characters.
  • Edge refinement: Color decontamination reduces halos around soft boundaries, while alpha matting and ViTMatte also refine transparency at a higher processing cost.

rembg supports CPU processing, compatible NVIDIA GPUs through CUDA and AMD GPUs through ROCm. Model downloads require an internet connection; the optional withoutBG backend requires an API key and sends images to withoutBG's cloud servers instead of using a local model.

The software is open source under MIT, but model weights have separate licenses. The default BRIA model requires a paid agreement for commercial use.

Similar to rembg