ShowStopperTheSecond / SAR-Image-Despeckling-Using-CNN-

An implementation of the paper SAR Image Despeckling Using a Convolutional Neural Network by Puyang Wang,
12 stars 0 forks source link

I have some doubts regarding the code #5

Open PalgunaGopireddy opened 1 month ago

PalgunaGopireddy commented 1 month ago

I ran SAR Image Despeckling Using a Convolutional.ipynb, I came across some doubts. Could you please answer them, it would make me understand CNN for descpecking. (I understand the repository used real-SAR images only, not synthetic-SAR images.)

  1. The metric equivalent number of looks (ENL) (which is used in paper for real-SAR image) calculation is not done. How to do it? Could you tell how to calculate the metrics UQI, DG also. It would really help me.
  2. The noisy_image is produced using skimage.util.random_noise function, but the paper told it used eq. 1 mentioned in the paper (though paper did not mention exact procesure). Do you know that skimage.util.random_noise function produces the multiplicative noise (or) you just used a function that produces noise
  3. The comparison methods probabilistic patch-based filter (PPB) [24], SAR-BM3D [25], CNN [15] are not done. It's ok. But could you give the links for these methods repositories. I will do it. I found the link for SAR-CNN [20].
  4. How to use Lee filter [5], Kuan filter [23] for denosing. COuld you show me link (or) reference how to apply them. It would really help me how filters are used for denoising.

Please answer above doubts. it would make me understand CNN for descpecking. I have some other doubts below, It is ok, even if you did not answer these. Just wanted to mention them.

  1. Why use tensorflow.keras.layers.Lambda function to create an expression x = x+1e-7, which is not in the paper. I gues it is for not producing the error of divide by zero. Am I correct? If so, does that effect the learned layer, because CNN is about learning the features, which are represented by values?
  2. Why the model created has 10 convolution layers, instead of 8 as shown in the paper, that two first 5 have Leaky_ReLU unlike all ReLU as shown in paper?
ShowStopperTheSecond commented 1 month ago

Hi there :)

1) I took a simplistic approach as I was just experimenting. You need to create a random variable with that specific distribution. And multiply it with your clean images. You can find many sources on the web explaining in detail how to create a a random variable from uniform distribution. It's not difficult take a look at here And about UQI, DG you should look elsewhere I'm sure you can find detailed implementation.

2) skimage.util.random_noise can produce a wide range or noises. You just need to specify the type of noise you want as an argument. .

3) Sorry I don't have any links to those methods. You need to keep searching.

4) There is a python library called findpeaks. Look it up it has a implementation of the some of the famous despeckling filters. You can find it useful.

And for your other questions:

1) You guessed right. Its mere function is to prevent division by zero. It will not affect the the network. The convergence happens anyway. You can even use multiplication instead of division. They're the same and multiplication doesn't produce error so you won't even need that term.

2) Actually I followed the author implementation in I think an uncommon language. That was how he did it. I just followed his architecture. look up the PapersWithCode. You can find it there.