Giter Club home page Giter Club logo

potatotian / diffseg_google Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/diffseg

2.0 0.0 0.0 61 KB

DiffSeg is an unsupervised zero-shot segmentation method using attention information from a stable-diffusion model. This repo implements the main DiffSeg algorithm and additionally includes an experimental feature to add semantic labels to the masks based on a generated caption.

Home Page: https://sites.google.com/corp/view/diffseg

License: MIT License

Python 48.84% Jupyter Notebook 51.16%

diffseg_google's Introduction

Diffuse, Attend, and Segment

This repo implements the DiffSeg segmentation method in the paper Diffuse, Attend, and Segment: Unsupervised Zero-Shot Segmentation using Stable Diffusion.

@article{tian2023diffuse,
 title={Diffuse, Attend, and Segment: Unsupervised Zero-Shot Segmentation using Stable Diffusion},
 author={Tian, Junjiao and Aggarwal, Lavisha and Colaco, Andrea and Kira, Zsolt and Gonzalez-Franco, Mar},
 journal={arXiv preprint arXiv:2308.12469},
 year={2023}
}

Overview

DiffSeg is an unsupervised zero-shot segmentation method using attention information from a stable-diffusion model. This repo implements the main DiffSeg algorithm and additionally include an experimental feature to add semantic labels to the masks based on a generated caption.

More details can be found on the project page: https://sites.google.com/corp/view/diffseg/home

Create conda environment

  • The environment uses Ubuntu 18.04 and Tensorflow 2.14 supported on CUDA 11.x and python 3.9.
cd diffseg
conda create --name diffseg python=3.9
conda activate diffseg
pip install -r path/to/requirements.txt

Computation Requirement

  • We recommend using 2 GPUs with a minimum 11G VRAM each, e.g., RTX2080Ti.
  • One GPU is for loading the Stable Diffusion model and the other is for the BLIP captioning model.

DiffSeg Notebook

Please see the instructions in the diffseg.ipynb for running instructions.

Benchmarks

We benchmark the performance of DiffSeg on CoCo-Stuff-27 and Cityscapes. Please see instructions in benchmarks.ipynb.

  • We follow the evaluation protocol in PiCIE and use the Hungarian algorithm for matching predictions and ground truth labels.

Contributors

  • Junjiao Tian (Google and Georgia Tech)
  • Lavisha Aggarwal (Google)
  • Andrea Colaco (Google)
  • Zsolt Kira (Georgia Tech)
  • Mar Gonzalez-Franco (Google)

diffseg_google's People

Contributors

margonzalezfranco avatar potatotian avatar eltociear avatar

Stargazers

 avatar Kai Cheng avatar

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.