Forum Discussion
How to easily delete background from image on a Windows PC?
Rembg is an open-source Python tool that uses local AI models to detect the foreground and remove the background. It is completely free, does not rely on any paid service, and all processing happens on your own PC. On Windows, the main challenge is getting the Python environment and command-line usage right.
Step 1: Install Python
Install Python 3.11 or 3.12. During setup, check "Add Python to PATH".
Step 2: Install Visual C++ Runtime
Download and install Visual C++ Redistributable 2015-2022 (x64). Without it, you may get a "No onnxruntime backend found" error. Restart your PC after installing.
Step 3: Install Rembg
Open Command Prompt or PowerShell and run:
bash
pip install "rembg[cpu,cli]"
Step 4: How to Delete Background from Image
Single image:
bash
rembg i input.jpg output.png
Batch folder:
bash
rembg p input_folder output_folder
Notes
- First run downloads the AI model (a few hundred MB) automatically.
- Default model u2net works for most images.
- Use -m u2netp for a faster, lighter model if needed.
That's the full process for how to delete background from image on Windows using Rembg.