2. Install the rembg plugin
--> open cmd
--> pip install rembg
3. Download u2net.onnx and copy the file to
C:\Users\User_Name\.u2net
4. Then create code like below :
from rembg import remove
from PIL import Image
input_path = 'C:\\Users\\User_Name\\Documents\\Biodata\\Testing_input.JPG'
output_path = 'C:\\Users\\User_Name\\Documents\\Biodata\\Testing_ouput.png'
input = Image.open(input_path)
output = remove(input)
output.save(output_path)