20.1 u2net configure

20210322

The rembg package is Python based and a collection of Python libraries are utilised. The pre-built model is also required and downloaded during the configure.

ml configure u2net

The configuration will proceed with something like the following:

*** The following required pip packages are already installed:
  filetype hsh numpy matplotlib pillow pymatting requests scikit-image
  scipy torch torchvision tqdm

*** Downloading required files ...

To view the model's README:

  ml readme cutout

Python and support files are downloaded from GitHub as specified in the MLHUB.yaml file.

meta:
  name         : rembg
  title        : rembg
  keywords     : rembg, background removal, image processing
  languages    : Python
  license      : MIT
  author       : u6440034@anu.edu.au
  url          : https://github.com/StafferOliver/rembg
dependencies:
  pip3:
    - filetype
    - hsh
    - numpy
    - matplotlib
    - pillow
    - pymatting
    - requests
    - scikit-image
    - scipy
    - torch
    - torchvision
    - tqdm
  files:
    - mlhub/README.md
    - mlhub/demo.py
    - mlhub/cutout.py
    - src/
    - examples/
commands:
  demo       : Run rembg demo with random example from provided pictures
  cutout     : Background removal on custom images```

Note: Currently mlhub does not support downloading files from Google Drive. When you run the demo for the first time the model is downloaded. However, Google Drive will sometimes return html instead of the actual file. It is understood this is an attempt to avoid multiple connections in a short period that could lead to a distributed denial of service attack.



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-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0