GithubHelp home page GithubHelp logo

jackzhousz / pair-diffusion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from picsart-ai-research/pair-diffusion

0.0 0.0 0.0 8.56 MB

PAIR-Diffusion: Object-Level Image Editing with Structure-and-Appearance Paired Diffusion Models, 2023

License: MIT License

Shell 0.07% C++ 0.64% Python 93.54% Cuda 5.75%

pair-diffusion's Introduction

PAIR-Diffusion

This is the official repo for the work:

PAIR-Diffusion: Object-Level Image Editing with Structure-and-Appearance Paired Diffusion Models
Vidit Goel1*, Elia Peruzzo1,2*, Yifan Jiang3, Dejia Xu3, Nicu Sebe2, Trevor Darrell4, Zhangyang Wang1,3 and Humphrey Shi 1,5,6

In association with Picsart AI Research (PAIR)1, UTrento2, UT Austin3, UC Berkeley4, UOregon5, UIUC6

*equal contribution

We built Structure and Appearance Paired (PAIR) Diffusion that allows reference image-guided appearance manipulation and structure editing of an image at an object level. Describing object appearances using text can be challenging and ambiguous, PAIR Diffusion enables a user to control the appearance of an object using images.

Try our demo at Huggingface space

[arXiv][Video]

News

Results

Given below are results for appearace editing using our method on SDv1.5

Object Level Image Editing

Stable Diffusion Results

  • Applying our method to Stable Diffusion allows reference image based editing in the wild

  • We can edit both structure and appearance of the objects independently.

Unconditional Diffusion Models

  • PAIR diffusion also works with unconditional diffusion models, we show results on LSUN churches, bedrooms and CelebA-HQ. We can perform edits using both in-domain and out-of-domain reference images.

Requirements

Setup the conda environment using the command below. We use Oneformer to get segmentation maps during inference, please setup environment for Oneformer following the repo

conda env create -f environment.yaml
conda activate pair-diff

Inference

To run the model launch the gradio demo using the command below. It will download the required models as well.

python gradio_app.py

Pretrained Models

We applied PAIR Diffusion on SDv1.5 and uses COCO-Stuff dataset for finetuning the model. The model card can be downloaded from here

BibTeX

If you use our work in your research, please cite our publication:

@article{goel2023pair,
      title={PAIR-Diffusion: Object-Level Image Editing with Structure-and-Appearance Paired Diffusion Models},
      author={Goel, Vidit and Peruzzo, Elia and Jiang, Yifan and Xu, Dejia and Sebe, Nicu and Darrell, Trevor and 
      Wang, Zhangyang and Shi, Humphrey},
      journal={arXiv preprint arXiv:2303.17546},
      year={2023} 
      }

pair-diffusion's People

Contributors

vidit98 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.