Repolode
danielgatis

danielgatis/rembg

A tool that removes image backgrounds, usable as a CLI, Python library, HTTP server, or Docker container.

Alternativa open source a:Remove.bgAdobe Photoshop

Estrelas
25,127
Forks
2,442
Issues abertas
2
Último commit
há 9 dias

O que é?

Rembg removes the background from images, leaving the subject as a transparent cutout. It runs local ONNX segmentation models such as U2Net, ISNet, SAM and several BiRefNet variants, which are downloaded automatically on first use. Cloud backends (withoutBG and Atlas Cloud) are also available through the same interface.

The same functionality is exposed in four ways: a `rembg` CLI for single files, folders and FFmpeg RGB24 streams; a Python `remove()` function accepting bytes, PIL images or NumPy arrays; an HTTP server with an API and Gradio UI; and a Docker image with CPU or NVIDIA CUDA builds. CPU, NVIDIA GPU and AMD ROCm backends are selected at install time through onnxruntime variants.

For soft edges such as hair or fur, the project offers color decontamination (`-dc`), alpha matting (`-a`) and ViTMatte (`-vm`) as alternative refinement modes.

Recursos principais

  • 01Runs local ONNX models including U2Net, ISNet, SAM and BiRefNet variants.
  • 02Offers CLI, Python library, HTTP server and Docker usage.
  • 03Supports batch folder processing and a watch mode.
  • 04Includes color decontamination and alpha matting for soft edges.
  • 05Accepts input as bytes, PIL images or NumPy arrays.
  • 06Provides optional cloud backends via withoutBG and Atlas Cloud.

Casos de uso

  • Batch removing backgrounds from product photos for e-commerce listings.
  • Adding a background-removal endpoint to a web service via the HTTP server.
  • Extracting subjects from video frames by piping FFmpeg output into rembg.
  • Creating transparent portraits with the portrait or human segmentation models.

Tópicos

Perguntas frequentes

O que é rembg?
A tool that removes image backgrounds, usable as a CLI, Python library, HTTP server, or Docker container. Rembg removes the background from images, leaving the subject as a transparent cutout. It runs local ONNX segmentation models such as U2Net, ISNet, SAM and several BiRefNet variants, which are downloaded automatically on first use. Cloud backends (withoutBG and Atlas Cloud) are also available through the same interface.
rembg é gratuito? Qual é a licença?
rembg é open source sob a licença MIT. Confira os termos da licença antes de usá-lo em produtos comerciais.
rembg ainda é mantido?
Manutenção ativa. O último commit de rembg foi em 10 de out. de 2026.
Para que posso usar rembg?
Batch removing backgrounds from product photos for e-commerce listings. Adding a background-removal endpoint to a web service via the HTTP server. Extracting subjects from video frames by piping FFmpeg output into rembg. Creating transparent portraits with the portrait or human segmentation models.
Onde consigo rembg?
O código-fonte e as instruções de instalação estão no GitHub: https://github.com/danielgatis/rembg

Resumo gerado por IA a partir do README do projeto. As estatísticas do GitHub são atualizadas diariamente.

Projetos relacionados