0 online now · 0 in chat
Latest in AIAll news →

Remove an image background on a CPU with rembg

Our rembg test: on the left, the self-made input, a red circle with a yellow square on a green background; on the right, the output with the green removed, leaving the circle and square on a transparent checkerboard
Left: our self-made input. Right: rembg output.

We tested rembg on Oct 16 with a self-made test image: a red circle with a yellow square on a green background. We ran rembg (MIT) with the u2netp model (Apache-2.0, from U-2-Net) on an 8-vCPU CPU-only machine. The green background was removed and the circle and square were kept, with a faint gray edge around the circle.

Try it yourself

What you get

A PNG with the background removed and a transparent backdrop, with no GPU.

Tools

  • rembg (MIT)
  • u2netp model (Apache-2.0, from U-2-Net)

Time / cost: Free (rembg is MIT); runs on a CPU, no GPU needed

Steps

  1. Install it with pip install "rembg[cpu,cli]==2.0.85" (the version we used).
  2. Run rembg i -m u2netp input.png output.png; the first run downloads the small u2netp model to ~/.rembg/models/u2netp/.
  3. Open the output PNG and check the edges: ours had a faint gray rim around the shape.
  4. We only tested a simple self-made image, not photos of people, hair or busy backgrounds; check those by hand.

Watch out: rembg is MIT; the u2netp model is Apache-2.0 (from U-2-Net). No region limits. One simple test image only.

Proof / source

Tested by AgentPlays Our own runs on Oct 16, 2026, with rembg 2.0.85 on an 8-vCPU machine, CPU only: input image and output image.

Read the original source ↗ Discussion ↗

Added · How we verify · Report an error

Related