16 U2Net

THIS CHAPTER IS UNDER DEVELOPMENT. PLEASE COME BACK LATER

20211014 Package: u2net. Chapter Author: Graham Williams

Removing the background from an image (referred to in the business as generating a cutout) can be a tedious task, unless you think to use AI to do it for you, in 5 minutes or less. This MLHub package demonstrates how to do just that. Utilising the u2net framework, the MLHub package can run a quick demo that visualises the results, for you to determine whether this package fits your needs. The capability is then provided as a command line tool, producing a cutout from any image file.

The u2net package will download the required pre-built model for the task, and then utilise the mode to perform the cutout.

To install, configure, and demonstrate the package:

ml install   https://github.com/StafferOliver/rembg as u2net
ml configure u2net
ml readme    u2net
ml commands  u2net
ml demo      u2net

In addition to the demo command the package also supports cutout.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.