Remove image background using python rembg module

 #remove image background using python rembg module

from rembg import remove

from PIL import Image

input_path='lists.png'  #old image path

output_path='lists-1.png' #new image path

inp=Image.open(input_path)

output=remove(inp)

output.save(output_path)


Note:first install rembg module using cmd

pip install rembg

rembg install only 3.8 later versions


No comments:

Post a Comment

Latest Post

Don’t Sweat It – Chill with Crompton Air Cooler Deals

 ðŸŒž Don’t Sweat It – Chill with Crompton Air Cooler Deals  More Details : https://www.amazon.in/s?k=laptops+under+70000&crid=29QIFPXQYB3...