Code Monkey home page Code Monkey logo

pbremtools's Introduction

Latest Updates

Combine Segment Anything and CLIP and control the generating mask with text has been added!

スクリーンショット 2023-04-11 115936

Segmentation can also be performed from the PBRemTools tab.

However, to use it, the Segment Anything Model must be added manually.

Download the model from here (https://github.com/facebookresearch/segment-anything#model-checkpoints) and place it under "models"(stable-diffusion-webui/extensions/PBRemTools/models).

This program is prepared with reference to (https://github.com/facebookresearch/segment-anything) and (https://github.com/Curt-Park/segment-anything-with-clip)

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.

Precautions

This program uses code that contains the Apache License 2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.