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
- Host: GitHub
- URL: https://github.com/mj-awad17/remove-background-using-python
- Owner: mj-awad17
- Created: 2023-10-04T21:04:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-05T10:48:36.000Z (about 2 years ago)
- Last Synced: 2025-01-14T12:51:22.585Z (11 months ago)
- Language: Python
- Size: 10.9 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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