albumentations-team / albumentations

Fast and flexible image augmentation library. Paper about the library: https://www.mdpi.com/2078-2489/11/2/125
https://albumentations.ai
MIT License
13.95k stars 1.63k forks source link

speckle noise? #439

Closed mobassir94 closed 4 years ago

mobassir94 commented 4 years ago

i want to apply speckle noise on my image training set,how can i do it using albumentation pytorch? i am not finding it here.please help,thanks

ternaus commented 4 years ago

What is speckle noise?

You may use https://albumentations.readthedocs.io/en/latest/api/augmentations.html#albumentations.augmentations.transforms.Lambda

to apply user-defined transforms to your images.

mobassir94 commented 4 years ago

Hi @ternaus Speckle noise is an undesirable effect. The source of this type of noise is caused due to random interference between the coherent returns issued from the so many scatterers present on a earth surface, on the scale of a wavelength of the incident radar wave.

Speckle reduction is an important step prior to the processing and analysis of the medical ultrasound images.

please check the "image quality assessment" section from this link : https://www.intechopen.com/books/advancements-and-breakthroughs-in-ultrasound-imaging/speckle-noise-reduction-in-medical-ultrasound-images

if you don't have direct implementation of speckle noise then i would like to know if you have similar thing in your library or not?

Dipet commented 4 years ago

As I understand, speckle is a multiplicative noise and it is formula y = Noise * x. If i wrong, please, correct me. As I know, in our library currently implemented only additive noise (look GaussNoise). I will try implement multiplicative noise in the coming few days.

mobassir94 commented 4 years ago

i used your gaussiannoise several time in the past but my supervisor forcing me to use speckle noise,i said him that we have gaussiannoise that can do good job but he is forcing me to use speckle where i can'r find speckle noise implementation in any data augmentation library,is spackle better than gaussiannoise? thank you @Dipet for your comment.

Dipet commented 4 years ago

All my knowledge's about speckle noise based on the paper, that you linked. I think the nearest to speckle noise is MultiplyElementwise from imgaug.

ternaus commented 4 years ago

Do we have a way to generate this noise? Maybe equation?

Dipet commented 4 years ago

In ultrasound images, the noise content is multiplicative and non Gaussian. Such noise is generally more difficult to remove than additive noise, because the intensity of the noise varies with the image intensity. A model of multiplicative noise is given by

yij= Xij * nij

where the speckle image yij is the product of the original image Xij, and the non-Gaussian noise nij.

From this article https://www.intechopen.com/books/advancements-and-breakthroughs-in-ultrasound-imaging/speckle-noise-reduction-in-medical-ultrasound-images

ternaus commented 4 years ago

If I understand correctly this noise is the same as Gaussian noise but multiplicative?

mobassir94 commented 4 years ago

i am using pytorch,how can i use speckle noise or something like multiplyElementwise in this kernel of mine? : https://www.kaggle.com/mobassir/unet-with-se-resnext50-32x4d-encoder-for-stage-2

please help a little bit,thank you a lot in advance

Dipet commented 4 years ago

Implemented as MultiplicativeNoise