I tried using the open source lightweight npm library `` background-removal-js '' that can remove the background from the image without the need for a server & without exchanging data with the outside



' background-removal-js ' is a background removal library that completes the operation only in the browser. Since it does not exchange data with the server, there are many advantages such as no need for server cost and no worry about data leaking, but in fact it is a place to worry about 'whether it cuts out properly'. This time I will try to remove the background of various images using the demo.

imgly/background-removal-js

https://github.com/imgly/background-removal-js

Background-removal-js is provided on the package manager npm and can be easily incorporated into web applications, but this time we will use the demo version that can be used immediately.

The screen of the demo version looks like this. You can upload your own images, and there are some samples for those who want a quick look. Click on the image of the sample woman.



Processing has started. In order to download the files necessary for execution, it may take some time depending on the communication environment for the first time.



Background removal was completed in about 30 seconds. There is only a sample prepared by the official, and it is cut out quite accurately. Since the button 'Edit in CE.SDK' has appeared, click it.



Then an editor appeared that allows you to insert a background image separately and insert characters and figures. In this way background-removal-js also supports integration with

Creative Editor SDK .



Cheerful older sister also cuts through perfectly.



Here is an example of a motorcycle. The ground in the back reflected in the gap between the wheels was also removed cleanly.



A fluffy dog seems to be quite difficult, but this is what background-removal-js does.



The color of the flowerpot and the background are close, but it cuts through without problems.



I will try not only the sample prepared by the official but also the image prepared by myself. It's hard to tell where the cow's feet are and where the grass is, but background-removal-js seems to be able to distinguish them properly. In addition, since it is not a generation AI, it does not newly draw the part hidden by the grass.



Even if the outline is quite blurred, you can distinguish it properly.



Background-removal-js can be used in the listing process of online trading services in addition to image editing applications and graphic design tools. In addition to being provided on npm under the GPL license, it is stated that it is possible to provide under other licenses by inquiring.

in Review,   Software,   Web Application, Posted by log1d_ts