fengzhang427 / LRD

Official implementation for our ICCV 2023 paper “Towards General Low-Light Raw Noise Synthesis and Modeling”
MIT License
60 stars 3 forks source link

Reimplement Problem of GAN #11

Open mldemox opened 1 month ago

mldemox commented 1 month ago
  1. When the noise image output from the generator is added with the shot noise, should the value of the noise be 0~1,my guess is to use bl with wb in the camera parameters for deflation, as written in the noise_proile file ?
  2. Is it necessary to use Sigmoid or ReLU layer in the output layer of the generator and discriminator?
fengzhang427 commented 1 month ago
  1. The generator does not output a noise image but rather a noise map similar to a dark frame with more accurate noise distribution. We add this to the shot noise and then clip it to the range [0, 1].
  2. Unnecessary. The final layer of generator is a conv layer. The final layer of discriminator is a linear layer to output confidence score.
mldemox commented 1 month ago

I found that the range of shot noise is more than 0~1, is it possible to use the following method to realize the zoom for noise image? image

fengzhang427 commented 1 month ago

I believe it is necessary to perform clipping after adding the noise. Shot noise indeed can exceed the [0, 1] range during Poisson sampling, and similar phenomena occur during CMOS noise generation. Moreover, in the process of analog-to-digital signal conversion, clipping also occurs. Therefore, clipping the noise after addition is a reasonable approach.

mldemox commented 1 month ago

Can you give me a specific example of the normalization function used, or is it possible to use the clip function to directly crop to between 0 and 1.

FengZhang @.***> 于2024年8月3日周六 22:46写道:

I believe it is necessary to perform clipping after adding the noise. Shot noise indeed can exceed the [0, 1] range during Poisson sampling, and similar phenomena occur during CMOS noise generation. Moreover, in the process of analog-to-digital signal conversion, clipping also occurs. Therefore, clipping the noise after addition is a reasonable approach.

— Reply to this email directly, view it on GitHub https://github.com/fengzhang427/LRD/issues/11#issuecomment-2266742723, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBWKNNAAUXUKBYQPQ266Y5TZPTUMZAVCNFSM6AAAAABL4JUON6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRWG42DENZSGM . You are receiving this because you authored the thread.Message ID: @.***>

fengzhang427 commented 1 month ago

You can simple clip it to [0,1].

mldemox commented 1 month ago

When I reproduce the dataset, I found that if I directly clip the read noise and shot noise to 0~1, it will break the overall distribution of the noise, can you please specify the method of generating the noise? My current process is to scale the clean image to the same magnitude as the noise image, get the shot noise, then generate the read noise between clip 0~1 according to the camera profile, pass it through the generator, add it with the shot noise, and normalize it into the discriminator and denoising network.

fengzhang427 commented 1 month ago

You only need to apply clipping after summing shot noise and read noise; normalization is not necessary.

mldemox commented 1 month ago

Thanks for the tip! Did you generate the camera noise parameters by sampling as follows,for different iso values, sample different noise parameters and synthesize different noise images for the SID dataset: [image: 图片.png]

FengZhang @.***> 于2024年8月14日周三 00:10写道:

You only need to apply clipping after summing shot noise and read noise; normalization is not necessary.

— Reply to this email directly, view it on GitHub https://github.com/fengzhang427/LRD/issues/11#issuecomment-2286620371, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBWKNNBXRA5W37U5A2YHJVLZRIVVTAVCNFSM6AAAAABL4JUON6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBWGYZDAMZXGE . You are receiving this because you authored the thread.Message ID: @.***>

fengzhang427 commented 1 month ago

I can not find any image, maybe it is not attached

mldemox commented 1 month ago

image

fengzhang427 commented 3 weeks ago

This code is used to synthesize a noisy image using noise parameters, not the process of calibrating noise parameters, which is a more specialized process.

mldemox commented 3 weeks ago

I understand, but what I want to ask is the synthesis of noisy data during SID training is implemented in the above way?

fengzhang427 commented 3 weeks ago

Yes, we utilize the above code to synthesis the shot noise (Poisson distribution), for the read noise, we utilize our generator to synthesis.