wyhuai / DDNM

[ICLR 2023 Oral] Zero-Shot Image Restoration Using Denoising Diffusion Null-Space Model
MIT License
1.16k stars 83 forks source link

Image colorisation #7

Closed manojkumar202 closed 1 year ago

manojkumar202 commented 1 year ago

Hi I'm trying to run this code for colorization. I'm loading the "celeba_hq.ckpt" model on ddnm to convert my grayscale to color. It produces brownish images. How should I train for colorization? I really appreciate any help you can provide.

manojkumar202 commented 1 year ago

I noticed that you have mentioned to look at the guided diffusion for training. what I'm unable to figure out is how is should I specify the colorization tasks during training(eg: should I change the loss function).

wyhuai commented 1 year ago

Hi I'm trying to run this code for colorization. I'm loading the "celeba_hq.ckpt" model on ddnm to convert my grayscale to color. It produces brownish images. How should I train for colorization? I really appreciate any help you can provide.

Can you show me your input image?

manojkumar202 commented 1 year ago

Input image b_n_w4

output image 2_0

manojkumar202 commented 1 year ago

Input image b_n_w_3

output image 4_0

manojkumar202 commented 1 year ago

It would be really great if I can know how to train for colorization specific task

wyhuai commented 1 year ago

You should use the imagenet model for these types and try different random seeds for diverse results. e.g., python main.py --ni --config imagenet_256.yml --path_y imagenet --eta 0.85 --deg "colorization" --sigma_y 0. -i imagenet_colorization

wyhuai commented 1 year ago

It would be really great if I can know how to train for colorization specific task

We don't need to train for specific tasks... Our colorization results on the front page are generated using the pre-trained ImgaeNet model with classifier guidance in the /hq_demo, but we only provide the SR task yet. Colorization and other tasks will be updated in the hq_demo in the future. For now, you may implement colorization on your own😂.

manojkumar202 commented 1 year ago

ok. Thank you. Seems like that is the option left now 😂.