DnCNN icon indicating copy to clipboard operation
DnCNN copied to clipboard

Train the net by my own (clean-noisy)image pairs

Open hujiayu712 opened this issue 5 years ago • 1 comments

hello If i want to train the net by my own (clean-noisy)image pairs but not guassian noise. How can i revise the train code.Thanks a lot!

hujiayu712 avatar Jun 04 '19 06:06 hujiayu712

You need to modify generatepatches.m and the training code which is DnCNN_train_dag.m or DnCNN_train.m The details are following

  1. 1, Change generatepatches Currently the code generate imdb files with two filed imdb.labels - clean patch and imbd.set - indicate training and testing mini-batch.
  2. In training code, the getSimpleNNBatch(imdb, batch) function will add noise to the clean image in imdb.labels as "inputs".

So for your problem you need to

  1. Modify generatepatches.m
  • It should return imdb with imdb.input (your noisy) and imdb.labels (clean image)
  1. Modify training code
  • Just load inputs and labels in getSimpleNNBatch(imdb, batch), do not need to add noise

Hope it helps

ngcthuong avatar Jun 04 '19 07:06 ngcthuong