Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How a robust background removal is implemented?

I found that a deep-learning-based method (e.g., 1) is much more robust than a non-deep-learning-based method (e.g., 2, using OpenCV).

  1. https://www.remove.bg
  2. How do I remove the background from this kind of image?

In the OpenCV example, Canny is used to detect the edges. But this step can be very sensitive to the image. The contour detection may end up with wrong contours. It is also difficult to determine which contours should be kept.

How a robust deep-learning method is implemented? Is any good example code? Thanks.

like image 851
user1424739 Avatar asked Sep 15 '19 11:09

user1424739


1 Answers

For that to work you need to use Unet. You can search for that on github. Unet transofrm is: I->I. Space of the image will become image (of same or similar size).

You need to have say 10.000 images with bg removed. People, (long hair people), cats, cars, shoes, T-shirts, etc.

So you set different backgrounds on all these images as source and prediction should be images with removed background.

You can also do a segmentation model and when you find the foreground you can remove the bg.

like image 80
prosti Avatar answered Nov 20 '22 00:11

prosti