This is a wrapper of rem_bg for auto1111's stable diffusion gui. It can do clothing segmentation, background removal, and background masking.
Clothing Masking (original, top, bottom, and combined)
Background Removal or Masks
Works on castles!
It should be installable from the extensions tab.
You might need to seperately install rem_bg
pip install rem_bg
for is-net you might need to update rem_bg
pip install -U rem_bg
In the WebUI, in the Extensions
tab, in the Installed
subtab, click Check for Updates
and then Apply and restart UI
.
Select the "remove_bg vX.X.X" script from the script selection box in either txt2img or img2img.
Masking button will give a black/white output which is very useful for inpainting.
u2net_cloth_seg
output 3 images for the clothing categories top, bottom, and combined (unless any of the checkmark are unticked)
u2net
, u2netp
, silueta
output images with the background removed.
u2net_human_segmentation
removes background as well but is optimized for keeping humans. It tends to keep legs which are sometimes cut by the previous models.
Clothing segmentation will only work for one person (if you want more people let me know, there might be a workaround). Clothing gets outputed as top, bottom, and combined. Combined represents fullbody length clothing.
This extension works nicely with depth https://github.com/thygate/stable-diffusion-webui-depthmap-script
- v0.0.2
- examples/readme
This is currently incomplete
Some code was used from Thygate's https://github.com/thygate/stable-diffusion-webui-depthmap-script
https://github.com/danielgatis/rembg
https://arxiv.org/pdf/2005.09007.pdf
https://github.com/NathanUA/U-2-Net