alterzero / DBPN-Pytorch

The project is an official implement of our CVPR2018 paper "Deep Back-Projection Networks for Super-Resolution" (Winner of NTIRE2018 and PIRM2018)
https://alterzero.github.io/projects/DBPN.html
MIT License
565 stars 164 forks source link

hi, thanks for awesome work. i just wonder that do you only train the net with div2k dataset without aug or with both imagenet and div2k? #2

Closed ghost closed 6 years ago

Zheng222 commented 6 years ago

From this code, the authors train the DBPN with the augmented DIV2K dataset. @BecketXu

Zheng222 commented 6 years ago

https://github.com/alterzero/DBPN-Pytorch/blob/c206139dcc87258fd93fef3bd8d7351bbcd523df/main.py#L33-L34 Hello, can you offer me the augmented datasets or augmented method? thanks you! @alterzero

ghost commented 6 years ago

right, i notice that.

Gavin666Github commented 6 years ago

How to train on your own data set?What should be paid attention to..?

ZhangDY827 commented 6 years ago

@alterzero Hello, can you provide the augment code to pre-process the DIV2K dataset, I can not reproduce the result you report and I think the pre-processing step matters

jshermeyer commented 6 years ago

There is an augment function in dataset.py. Based on the code it seems you may have to run that first to create the augmented dataset and save in separate location. Then you can train on augmented data. I haven't done this so I'm unsure if I'm correct.

zhuofeng commented 6 years ago

@BecketXu Have you solved your problem? It seems that some kind of data augmentation code needs to be executed to produce the training data. Is the code in this project? Or somewhere else?

kuroyanagi33 commented 6 years ago

@BecketXu @jshermeyer DBPN-Pytorch is based on EDSR-Pytorch code. The author of EDSR-Pytorch explained about data argument. Please refer to the following link. https://github.com/thstkdgus35/EDSR-PyTorch/issues/38

zhuofeng commented 6 years ago

@kuroyanagi33 Thank you. I think this solved my problem.

jshermeyer commented 6 years ago

Thanks @kuroyanagi33

I think this was my confusion, from main.py:

parser.add_argument('--data_augmentation', type=bool, default=True) parser.add_argument('--hr_train_dataset', type=str, default='DIV2KHRaug') parser.add_argument('--train_dataset', type=str, default='DIV2KLRaug_x8')

But, if I just point these at non-augmented LR and HR DIV2K and leave the data_augmentation tag set to True, I believe the code will automatically augment during training?

kuroyanagi33 commented 6 years ago

@jshermeyer This code carries out online augmentation (data is not increased during training, randomly inverted, rotated etc only) by data_augmentation = True. According to personal guesses, I think that 'DIV2K_HR_aug' was data augmented in some other way (not included in this code). Probably in order to increase accuracy with the NTIRE2018 competition, I think the author of DBPN made data augmentation in advance. The code of online augmentation is based on EDSR-pytorch's author's code. EDSR is the state of the art code before DBPN. The author of EDSR mentioned that the data of DIV2K is so big that he performed a process like online augmentation.

ghost commented 6 years ago

@kuroyanagi33 thanks for explain. i am training the code just with the "augment" func in dataset.py

alterzero commented 6 years ago

Hi all, I'm so sorry for my very late reply. I have been swamped with other works. The built-in augmentation function does not contain resize function. So, basically you need to do resize operation offline using matlab to generate more images.