JamesH he wrote shortly:
First you need to successful install rembg.
For Windows, this is not too complicated, but with a few surprises.
I will share my experience of installing rembg.exe in Windows 10_64bit.
I tried to compile in msys64 - unfortunately without success (lots of bugs to analyze - although the use of msys64 seems not to be considered eg.:
AttributeError: 'MSVCCompiler').
So I installed python-3.9.7-amd64.exe and then:
C: \ Python39> python.exe -m pip install rembg
Successfully installed:
PySocks-1.7.1 PyWavelets-1.3.0 aiohttp-3.8.1 aiosignal-1.2.0 anyio-3.6.1 asgiref-3.5.2 async-timeout-4.0.2 asyncer-0.0.1 attrs-21.4.0 beautifulsoup4-4.11.1 certifi-2022.6.15 charset-normalizer-2.1.0 click-8.0.3 colorama-0.4.5 fastapi-0.72.0 filelock-3.7.1 filetype-1.0.9 flatbuffers-2.0 frozenlist-1.3.0 gdown-4.4.0 h11-0.13.0 idna-3.3 imageio-2.20.0 llvmlite-0.38.1 multidict-6.0.2 networkx-2.8.5 numba-0.55.2 numpy-1.22.3 onnxruntime-1.10.0 packaging-21.3 pillow-9.0.1 protobuf-4.21.3 pydantic-1.9.1 pymatting-1.1.5 pyparsing-3.0.9 python-multipart-0.0.5
rembg-2.0.21 requests-2.28.1 scikit-image-0.19.1 scipy-1.8.0 six-1.16.0 sniffio-1.2.0 soupsieve-2.3.2.post1 starlette-0.17.1 tifffile-2022.5.4 tqdm-4.62.3 typing-extensions-4.3.0 urllib3-1.26.11 uvicorn-0.17.0 watchdog-2.1.7 yarl-1.7.2
After correcting the path in RemoveBG.py, I ran the plugin.
Another surprise:
So I installed:
I restarted it and surprise again:
It only uses the model u2net.onnx (A pre-trained model for general use cases) - I don't know how to change it, for example: u2net_human_seg.onnx (A pre-trained model for human segmentation).
The result leaves little illusion, so I agree with
Tas_mania opinion: It is by no means perfect.
However, there is a mask for corrections - so thanks to
JamesH for thinking about it.
Also, the installation method is probably not encouraging for the majority of users.