An open API service indexing awesome lists of open source software.

https://github.com/mj-awad17/remove-background-using-python


https://github.com/mj-awad17/remove-background-using-python

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# Remove-Background-using-Python πŸ–ΌπŸ

Pircture Background remove πŸ–Ό using the famous πŸŽ‡ language Python 🐍



Rembg is tool in python for removing the background.

# **Requirements**

use python veriosn: > 3.7 and < 3.12

# **Install Package**

!pip install rembg

If you are windwo user:

- using terminal

- window powershell

- cmd

After installing the package

# **Flow of Code**

Follow the steps to remove picture backgouound using python 🐍

**1.** From rembg import remove for remove bg

from rembg import remove

**2.** From pil import image after removebg saving the picture

from PIL import Image

**3.** Get the path of the image and output path for saving

image_path = 'cats.jpg'

image_removeBg_path = 'cats-removebg.png'

**4.** Open your picutre path using the open()

taking_image = Image.open(image_path)

**5.** Now then remove background using remove()

giving_image = remove(taking_image)

**6.** After doing step 4 save your picture

giving_image.save(image_removeBg_path)

---------------------------------------------------

# **Regards**

If this is πŸ’― Help full...please ⭐⭐⭐⭐ this repository file

Gain πŸ‘¨πŸŽ“ knowledge and spreading πŸ‘¨πŸ« knowlege is best way 🚘 to become master πŸ¦ΎπŸ“ˆ in your path.

So feel free πŸ˜ŠπŸ’— for any other query/help:-

contact- jawadrana660@gmail.com