Closed miladfa7 closed 2 months ago
Here, you get the returned value of both the predicted mask and the original image. With the mask (0 or 1), you can use mask * original image + (1 - mask) * new background
to replace the original background with a new image.
After running the model and removal background, the output result has black background. My question is how to get output image without black, i mean save output image (
image_preds[0]
) as transparent image.The code: