IDKiro / CBDNet-pytorch

Toward Convolutional Blind Denoising of Real Photograph
MIT License
172 stars 29 forks source link

About the AddRealNoise function #11

Closed sky135410 closed 4 years ago

sky135410 commented 4 years ago

In the AddRealNoise function there is one line noise_img = AddNoiseMosai(image, CRF_para, iCRF_para, I_gl, B_gl, I_inv_gl, B_inv_gl, sigma_s, sigma_c, CRF_index, pattern, 0)

I want to know what mean in the last given parameter opt=0

Thanks

IDKiro commented 4 years ago

the image transformed from CRF and iCRF is different from original image. opt is a choice for add noise on original image or transformed image. the official add_noise code has changed a lot (refer to UIP), i recoommend you read the offcial python code.

sky135410 commented 4 years ago

Because I did not see the opt in the official python code. Could you tell me why we need the two different add noise process instead just add noise on transformed image like the official version?

Besides, which part correspond to the JPEG compression process mentioned in the paper?

Very thanks

IDKiro commented 4 years ago
  1. it do nothing, only for viewing.
  2. there is no code of JPEG compression in this repo becasue i know little about it.

my python code is finished before the offcial python code, but the offcial python code is better, and you'd better to learn from the official code. if you want to train your own model, i can provide a new repo that combines the official code and training code.

sky135410 commented 4 years ago

In the official code I also can not find the part about JPEG compression. Are there some parts I missing?

I am very thankful if you can provide a new repo. Recently I try to understand and train the model by your pytorch version code.

IDKiro commented 4 years ago

im sorry that i don't care about the code of JPEG compression, just try by yourself.

this new repo is from the code of my last paper:

https://github.com/IDKiro/dnd-submit-pytorch

the dataset has not been upload yet.