Forum Discussion
How can I remove background from a photo or picture in bulk?
Here’s how you can use BackgroundRemover on your Windows PC. Just a heads-up—this is a command-line tool, but the steps are pretty simple once you get the hang of it.
Step 1: Install Python
Step 2: Install BackgroundRemover
Open Command Prompt as an administrator. You can do this by searching "cmd" in the Start menu, right-clicking it, and selecting "Run as administrator." Once it’s open, type this command and press Enter:
text
pip install backgroundremover
Step 3: Process a Single Image
To test it out on one image, navigate to where your pictures are stored using the cd command, or just use the full file path in the command. Here’s the basic command:
text
backgroundremover -i "C:\path \to \your \image. jpg" -o "C:\ path\ to\ output. png"
Step 4: Remove Background from Photo Free in Bulk
Here’s where the magic happens for your bulk needs—you can process an entire folder at once with this command:
text
backgroundremover -if "C:\ path\ to\ input -folder" -of "C:\ path \to \output -folder"
Step 5: Use Different Models for Better Results
If you’re removing backgrounds from people, you can get better accuracy with the human segmentation model:
text
backgroundremover -i "image.jpg" -m "u2net_ human _seg" -o "output.png"
For sharper edges on graphics or cartoons, you can also enable alpha matting with the -a flag and adjust the erosion size.
And that's it! Now you can easily remove background from photo free for as many images as you want, all offline and completely free. Just remember the tool uses AI, so results are usually great, but complex images might need a bit of tweaking with the alpha matting options.