Giter Site home page Giter Site logo

ku-cvlab / dreammatcher Goto Github PK

View Code? Open in Web Editor NEW
137.0 6.0 4.0 181.01 MB

Official implementation of "DreamMatcher: Appearance Matching Self-Attention for Semantically-Consistent Text-to-Image Personalization" (CVPR 2024)

Python 99.97% Makefile 0.03%

dreammatcher's Introduction

DreamMatcher: Appearance Matching Self-Attention for Semantically-Consistent Text-to-Image Personalization (CVPR'24)

This is the official implementation of the paper "DreamMatcher: Appearance Matching Self-Attention for Semantically-Consistent Text-to-Image Personalization" by Jisu Nam, Heesu Kim, DongJae Lee, Siyoon Jin, Seungryong Kim†, and Seunggyu Chang†.

Teaser

For more information, check out the [project page].

Environment Settings

git clone https://github.com/KU-CVLAB/DreamMatcher.git
cd DreamMatcher

conda env create -f environment.yml
conda activate dreammatcher
pip install -r requirements.txt

cd diffusers
pip install -e .

Pre-trained Weights

You can run DreamMatcher with any off-the-shelf personalized models. We provide pre-trained personalized models of Textual Inversion, DreamBooth, and CustomDiffusion on the ViCo dataset. You can find the pre-trained weights on Link.

Dataset

Image Dataset

For a fair and unbiased evaluation, we used the ViCo image and prompt dataset gathered from Textual Inversion, DreamBooth, and CustomDiffusion. The dataset comprises 16 concepts, including 5 live objects and 11 non-live objects. In the ./inputs folder, you can see 4-12 images of each of the 16 concepts.

Prompt Dataset

We provide the ViCo prompt dataset for live objects in ./inputs/prompts_live_objects.txt and for non-live objects in ./inputs/prompts_nonlive_objects.txt.

Additionally, for evaluation in more complex scenarios, we propose the challenging prompt dataset, which is available in ./inputs/prompts_live_objects_challenging.txt and ./inputs/prompts_nonlive_objects_challenging.txt.

Run DreamMatcher

To run DreamMatcher, select a personalized model from "ti", "dreambooth", or "custom_diffusion" as the baseline. Below, we provide example code using "dreambooth" as the baseline, with 8 samples. Output images for both the baseline and DreamMatcher will be saved in the result directory.

Run DreamMatcher on the ViCo prompt dataset:

  python run_dreammatcher.py --models "dreambooth" --result_dir "./results/dreambooth/test" --num_samples 8 --num_device 0 --mode "normal"

Run DreamMatcher on the proposed challenging prompt dataset:

  python run_dreammatcher.py --models "dreambooth" --result_dir "./results/dreambooth/test" --num_samples 8 --num_device 0 --mode "challenging"

Evaluation

To evaluate DreamMatcher, specify the result directory containing the result images from both the baseline and DreamMatcher. ICLIP, IDINO, and TCLIP metrics will be calculated.

Evaluation on the ViCo prompt dataset :

  python evaluate.py --result_dir "./results/dreambooth/test" --mode "normal"

Evaluation on the proposed challenging prompt dataset :

  python evaluate.py --result_dir "./results/dreambooth/test" --mode "challenging"

Collect Evaluation Results

Collect evaluation results for every concept in the result directory:

  python collect_results.py --result_dir "./results/dreambooth/test"

Results

Qualitative comparision with baselines for live objects:

Base_live

Qualitative comparision with baselines for non-live objects:

Base_nonlive

Qualitative comparison with previous works for live objects:

Sota_live

Qualitative comparison with previous works for non-live objects:

Sota_nonlive

Acknowledgement

We have mainly borrowed code from the public project MasaCtrl. A huge thank you to the authors for their valuable contributions.

BibTeX

If you find this research useful, please consider citing:

@misc{nam2024dreammatcher,
      title={DreamMatcher: Appearance Matching Self-Attention for Semantically-Consistent Text-to-Image Personalization}, 
      author={Jisu Nam and Heesu Kim and DongJae Lee and Siyoon Jin and Seungryong Kim and Seunggyu Chang},
      year={2024},
      eprint={2402.09812},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

dreammatcher's People

Contributors

nam-jisu avatar ku-cvlab avatar

Stargazers

PanYang avatar  avatar  avatar Gavin avatar  avatar  avatar daebakk avatar hyunsoo avatar Dongyang Li avatar Chen Nan avatar liwenyang-911 avatar jiwoo avatar Yan Li avatar Wenyi Mo avatar WPC avatar kwjames98 avatar Sinuo Wang avatar  avatar Ruonan Yu avatar  avatar  avatar Inès Hyeonsu Kim avatar  avatar  avatar Hyungwook Choi avatar 박시형 avatar Qilong avatar Kim SeYeon avatar 0xhephaistos avatar Hyoungwon Cho avatar An Seung Jun avatar Hyogon Ryu avatar KIM MINSU avatar  avatar  avatar Shuai Tan avatar WenKang Han avatar KG Duan avatar Vu Hoang avatar BohanZeng0217 avatar  avatar Jaewoo Jung avatar  avatar Seonghoon Park avatar  avatar Pengxiang Li avatar Tatsuya Ishihara avatar  avatar ppTanya avatar Quang-Binh, NGUYEN avatar Yiming Shi avatar Ajitabh Kumar avatar HEESU KIM avatar  avatar AULAY WANG avatar Suho Noh avatar Tengteng Huang avatar Lemondy avatar Binglei Li avatar Zhengkai Jiang avatar  avatar  avatar hsshin avatar  avatar Jianjie(JJ) Luo avatar Chenxin Li avatar  avatar Aryan avatar Griffin Seonho Lee avatar Gyuseong Lee avatar  avatar ChrisRaynor avatar ShengguangZhou avatar Jeff Carpenter avatar  avatar Edge Micro avatar Lu Ming avatar Injae Kim avatar  avatar SunwooKim avatar Michael Su avatar  avatar Yuhong Zhang avatar Dongwoo Im avatar zimenglan avatar  avatar Steralys avatar Jose Cohenca avatar Hyeonho, Jeong avatar Thomas Jacquemin avatar qingqing.tang avatar Yeojeong Park avatar Minxing Luo avatar Wonkyung Lee avatar hrz avatar Liam Zebedee avatar  avatar Yucheng Han avatar  avatar Lau Van Kiet avatar

Watchers

qingqing.tang avatar Tatsuya Ishihara avatar Kostas Georgiou avatar yamkaz avatar  avatar Zhenyu Tang avatar

dreammatcher's Issues

About modifications diffusers version

Thank you for the great work on this project. In relation to that, I am looking to ascertain the specific commit of the diffusers library that the set of modifications is based on. My aim is to examine the crucial code changes to understand the extent of modifications and explore possibilities for simplification.

Could you share the commit hash about the base diffusers? Thank you for your time and assistance.

Question about support XL

First of all, thank you very much for conducting research on such an excellent topic.

It seems that this paper is based on training with stable diffusion 1.5.

Do you have plans to train with the diffusion XL model in the future?

I am curious about the milestones for whether this project will have additional updates in the future.

thank you!

Will there be scripts for getting the pretrained model weights?

Thanks for your awesome work and effort in making it open-source.
I am not familiar with this field, but I notice that there are personalized models. I guess getting them still needs some processing. It would be much easier for other researchers to follow your work if there are scripts of how to get them.

Thanks!

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.