Skip to content

Implementation for for "L-CAD: Language-based Colorization with Any-level Descriptions using Diffusion Priors"

Notifications You must be signed in to change notification settings

changzheng123/L-CAD

Repository files navigation

L-CAD: Language-based Colorization with Any-level Descriptions using Diffusion Priors

Abstract

Language-based colorization produces plausible and visually pleasing colors under the guidance of user-friendly natural language descriptions. In this paper, we propose L-CAD to perform language-based colorization with any level descriptions.

Additionally, we showcase its capability for efficient automatic colorization.

Prerequisites

  • Python 3.9
  • PyTorch 1.12
  • NVIDIA GPU + CUDA cuDNN

Installation

Clone this repo:

https://github.com/changzheng123/L-CAD.git

Install PyTorch and dependencies

http://pytorch.org

Install other python requirements

pip install -r requirement.txt

Test with pre-trained model

Download pre-trained models here (baidu) (google) and put them into "./models", and run:

python colorization_main.py 

Run demo with instance-aware sampling:

python inference.py

Train

Download dataset:

Extended COCO-Stuff provides additional correspondence annotations between color words and object words. Download coco2017 images here.

Multi-instance contains samples with distinctive visual characteristics and detailed language descriptions for multiple instances in images.

Download init_model:

Download init_model from (baidu) (google) and put it into "./models".

Run the command:
python colorization_main.py -t

License

Licensed under a Creative Commons Attribution-NonCommercial 4.0 International.

Except where otherwise noted, this content is published under a CC BY-NC license, which means that you can copy, remix, transform and build upon the content as long as you do not use the material for commercial purposes and give appropriate credit and provide a link to the license.

Citation

If you use this code for your research, please cite our papers L-CAD: Language-based Colorization with Any-level Descriptions using Diffusion Priors

@InProceedings{lcad,
  author = {Chang, Zheng and Weng, Shuchen and Zhang, Peixuan and Li, Yu and Li, Si and Shi, Boxin},
  title = {L-CAD: Language-based Colorization with Any-level Descriptions using Diffusion Priors},
  booktitle = {{NeurIPS}},
  year = {2023}
}

Other language-based colorization

L-CoDe: Language-based colorization using color-object decoupled conditions (AAAI22)

L-CoDer: Language-based colorization with color-object decoupling transformer (ECCV22)

L-CoIns: Language-based colorization with instance awareness (CVPR23)

About

Implementation for for "L-CAD: Language-based Colorization with Any-level Descriptions using Diffusion Priors"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages