PBRemTools(Precise background remover tools) is a collection of tools to crop backgrounds from a single picture with high accuracy.
Go to file
mattyamonaca 93af450cad add model folder 2023-04-11 11:32:39 +09:00
models add model folder 2023-04-11 11:32:39 +09:00
scripts add SAM 2023-04-11 11:29:20 +09:00
.gitignore add model folder 2023-04-11 11:32:39 +09:00
LICENSE Initial commit 2023-04-05 08:38:33 +09:00
README.md Update README.md 2023-04-05 12:23:26 +09:00
demo.py add install.py 2023-04-05 10:43:36 +09:00
install.py add SAM_CLIP 2023-04-10 14:45:53 +09:00

README.md

PBRemTools

PBRemTools(Precise background remover tools) is a collection of tools to crop backgrounds from a single picture with high accuracy.

  • Base Image

  • PBRemTools(Tile division ABG Remover)

  • PBRemTools(CascadePSP)

  • ABG Remover

  • RemBG

Tools

Tile division ABG Remover

This tool is based on Anime Remove Background(https://huggingface.co/spaces/skytnt/anime-remove-background) and ABG_extension(https://github.com/KutsuyaYuki/ABG_extension).

Post-processing is added for more precise cropping based on the mask image generated by Anime Remove Background.

In this post-processing step, the input image is divided into a specified number of tiles, and the pixels in each tile are clustered based on color information.

Extract clusters whose mask image content exceeds a threshold value as foreground.

Parameters

  • horizontal split num: Number of horizontal tile divisions.
  • vertical split num: Number of vertical tile segments.
  • n_cluster: Number of clusters based on color information.
  • alpha threshold: Transparency of the mask considered as foreground.
  • mask content ratio: Threshold for how much mask a cluster should contain to be considered foreground.

CascadePSP

This tool is based on CascadePSP(https://github.com/hkchengrex/CascadePSP).

Installation

  • Stable diffusion web ui. Install from webui's Extensions tab.