swz30 / MIRNet

[ECCV 2020] Learning Enriched Features for Real Image Restoration and Enhancement. SOTA results for image denoising, super-resolution, and image enhancement.
Other
667 stars 96 forks source link

Training Code #5

Closed PangTongyao closed 4 years ago

PangTongyao commented 4 years ago

Hi! The performance of your method on the real noisy datasets is really attractive. I am trying to train the denoising model by following the instructions in the paper, but have some difficulties reproducing the results. It seems that the model is too large to train with batch size 16 on a GPU with 24GB memory. The training dataset is also very large such that it takes very long to process one epoch. Could I know the details of the training time and implementation devices? It would be better if you could share the training code. Looking forward to your reply! Thank you!

swz30 commented 4 years ago

Hi,

We use 2 NVIDIA Tesla V100 GPUs to train the model. With your GPU of 24GB memory, I would suggest either reduce the batch size to 8, Or keep the batch size 16, but change n_feat=32 in the model file (This will make the model lighter but with a minor compromise on accuracy  https://github.com/swz30/MIRNet/blob/a668d271d46db336823021d6c44205e4b95117ef/networks/MIRNet_model.py#L347)

Since the SIDD training images are of very high resolution, you can first crop patches offline (from the full resolution images) and then train the model on these patches. In our case, we cropped 350 patches of size 256x256 from each image (totalling 350*320 patches).

Regarding the training code, we are aiming to release it in two weeks' time. 

PangTongyao commented 4 years ago

Thank you so much for your reply! I will retry it!