Repolode
danielgatis

danielgatis/rembg

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

代替できる製品:Remove.bgAdobe Photoshop

スター
25,127
フォーク
2,442
未解決の Issue
2
最終コミット
9 日前

これは何?

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.

主な機能

  • 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.

ユースケース

  • 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.

トピック

よくある質問

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 は無料で使えますか?ライセンスは?
rembg は MIT ライセンスのオープンソースです。商用製品で使う前にライセンス条件を確認してください。
rembg は今もメンテナンスされていますか?
活発にメンテナンス中。rembg の最終コミットは 2026年10月10日 です。
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.
rembg はどこで入手できますか?
ソースコードとインストール手順は GitHub にあります:https://github.com/danielgatis/rembg

概要はプロジェクトの README をもとに AI が生成しています。GitHub の数値は毎日更新されます。

関連プロジェクト