GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - microsoft/ReCo: ReCo: Region-Controlled Text-to-Image Generation, CVPR 2023

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
configs
configs
 
 
evaluation
evaluation
 
 
ldm
ldm
 
 
models
models
 
 
scripts
scripts
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
SUPPORT.md
SUPPORT.md
 
 
environment.yaml
environment.yaml
 
 
eval.sh
eval.sh
 
 
inference.sh
inference.sh
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
train.sh
train.sh
 
 

Repository files navigation

ReCo: Region-Controlled Text-to-Image Generation

ReCo: Region-Controlled Text-to-Image Generation

by Zhengyuan Yang, Jianfeng Wang, Zhe Gan, Linjie Li, Kevin Lin, Chenfei Wu, Nan Duan, Zicheng Liu, Ce Liu, Michael Zeng, Lijuan Wang

IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2023.

******* Update: ReCo is now available at Huggingface Diffusers! COCO Model LAION Model.

Credits to Jaemin Cho. Thank you! *******

Introduction

ReCo extends T2I models to understand coordinate inputs. Thanks to the introduced position tokens in the region-controlled input query, users can easily specify free-form regional descriptions in arbitrary image regions. For more details, please refer to our paper.

Citation

@inproceedings{yang2023reco,
  title={ReCo: Region-Controlled Text-to-Image Generation},
  author={Yang, Zhengyuan and Wang, Jianfeng and Gan, Zhe and Li, Linjie and Lin, Kevin and Wu, Chenfei and Duan, Nan and Liu, Zicheng and Liu, Ce and Zeng, Michael and Wang, Lijuan},
  booktitle={CVPR},
  year={2023}
}

Installation

Clone the repository:

git clone https://github.com/microsoft/ReCo.git
cd ReCo

A conda environment named reco_env can be created and activated with:

conda env create -f environment.yaml
conda activate reco_env

Or install packages in requirements.txt:

pip install -r requirements.txt

AzCopy

We recommend using the following AzCopy command to download. AzCopy executable tools can be downloaded here.

Example command:

path/to/azcopy copy <folder-link> <target-address> --resursive"

# For example:
path/to/azcopy copy https://unitab.blob.core.windows.net/data/reco/dataset <local_path> --recursive

Data

Download processed dataset annotations dataset folder in the following dataset path (~59G) with azcopy tool.

path/to/azcopy copy https://unitab.blob.core.windows.net/data/reco/dataset <local_path> --recursive

Inference and Checkpoints

ReCo checkpoints trained on COCO and a small LAION subset can be downloaded via wget or AzCopy here ReCo_COCO and ReCo_LAION. Save downloaded weights to logs.

inference.sh contains examples for inference calls

eval.sh contains examples for coco evaluation.

Fine-tuning

For ReCo fine-tuning, we start with the stable diffusion model with instructions here. Weights can be downloaded on HuggingFace. The experiments mainly use sd-v1-4-full-ema.ckpt.

train.sh contains examples for fine-tuning.

Acknowledgement

The project is built based on the following repository:

  • CompVis/stable-diffusion,
  • XavierXiao/Dreambooth-Stable-Diffusion,
  • harubaru/waifu-diffusion: stable diffusion finetuned on danbooru.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

About

ReCo: Region-Controlled Text-to-Image Generation, CVPR 2023

Resources

Readme
MIT license

Code of conduct

Code of conduct

Security policy

Security policy
Activity
Custom properties

Stars

135 stars

Watchers

2 watching

Forks

12 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.