mahmoudnafifi / Deep_White_Balance

Reference code for the paper: Deep White-Balance Editing (CVPR 2020). Our method is a deep learning multi-task framework for white-balance editing.
Other
536 stars 70 forks source link

how to train your model on set2 or cube+ dataset? #3

Closed TengFeiHan0 closed 4 years ago

TengFeiHan0 commented 4 years ago

after checking your code, I find that your dataloader is only suitable to set1, but set1 consists of a large amount of dataset. I want to train your model on set2 or cube+, but I didn't the corresponding dataloader

xuhui1994 commented 4 years ago

这个代码我用set1运行了,但是set1数据集下载下来不能直接使用,还需要做一点点处理,另外作者在论文中说得和实际在代码上运行有那么一点出入,我一直没训练到作者给我们的那种model的程度。

TengFeiHan0 commented 4 years ago

@xuhui1994 你是怎么做的?方便交流一下吗?

xuhui1994 commented 4 years ago

加微信xh978188311,交流一下

------------------ 原始邮件 ------------------ 发件人: "Tengfei han"<notifications@github.com>; 发送时间: 2020年9月7日(星期一) 下午5:26 收件人: "mahmoudnafifi/Deep_White_Balance"<Deep_White_Balance@noreply.github.com>; 抄送: "威爵"<978188311@qq.com>; "Mention"<mention@noreply.github.com>; 主题: Re: [mahmoudnafifi/Deep_White_Balance] how to train your model on set2 or cube+ dataset? (#3)

@xuhui1994 你是怎么做的?方便交流一下吗?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

mahmoudnafifi commented 4 years ago

@TengFeiHan0 Yes, the code is only provided for training on Set1 with the augmented set. But, you can do some steps to make it works for other sets. You first need to copy all input/gt images into a single directory, such that for each image there are three ground-truth images with the same name but end with the following parts: 'G_AS.png', 'T_AS.png', 'S_AS.png' (for AWB, Tungsten WB, and Shade WB WB ground-truth, respectively). Other input images should also follow the same style; i.e., imagename_A_B.png, here A and B can be random characters or it can be the WB settings, and picture style, respectively (as we have in Set1). Then, use fold=0 and the training should start without any problem.

mahmoudnafifi commented 4 years ago

@xuhui1994 if you have any questions, please let me know .. but in English please :).

TengFeiHan0 commented 4 years ago

@mahmoudnafifi I have downloaded your WB dataset, but I failed to unzip it correctly. The command I used is cat Set1_input_images.z* > wb.zip && unzip wb.zip,after this I only got about 10000 images. I guess there have some problem when unzipping these files. If possible, would you mind providing a single link to the Set1 dataset rather than so many parts? Or how did you unzip your files under the Linux system?

mahmoudnafifi commented 4 years ago

I will find a way to upload them in a single zip file and back to you soon.

TengFeiHan0 commented 4 years ago

@mahmoudnafifi ok, thank you for help. I'm waiting for you. By the way, for set2 or cube+ dataset, there don't have the corresponding gt images end with ('G_AS.png', 'T_AS.png', 'S_AS.png'), how did you generate it?

mahmoudnafifi commented 4 years ago

@TengFeiHan0 Yes, you need either to rename Cube+'s ground truth images to end with G_AS.png or maybe change the code. One more thing, not all images in Set1 have ground-truth of T and S white-balance settings with the Adobe Standard (AS) picture style. So, you need to add a piece of code to select only those images that have ground-truth. Please, check this comment.

Update: I have uploaded Set 1 as a single zip file. Check it from here or here.