How to add noise to an augmentedImageDatastore for neural network training

9 views (last 30 days)
I am training a neural network on a dataset of images. I am using the augmentedImageDatastore object during training to have some basic random geometric transformations that change at every epoch :
% Data augmentation
augmenter = imageDataAugmenter( ...
'RandXTranslation',[-10 10], ...
'RandYTranslation',[-10 10])
imageSize = [128 128 3];
auimds = augmentedImageDatastore(imageSize,XData,YData,'DataAugmentation',augmenter)
% Neural network training
layers = ...
options = ...
NET = trainNetwork(auimds,layers,options);
I know that there exists an denoisingImageDatastore that has the same functionality but for noise instead of geometric transformations, but I can't find a way to combine both functionnalities during training.
My current approach is to add noise once to my images and then using these noisy images as XData in the augmentedImageDatastore, but it means that the noise will always be the same for a given image. I would like to have a random translation and random noise added to my images, while keeping the fact that the noise and the translations are randomly changed at each epoch.
Is it possible to do that?

Accepted Answer

Ranjeet
Ranjeet on 7 Jun 2023
Hi Noe,
As per my understanding, you want to add random noise to image along with random scaling, translation etc. Currently, augmentedImageDatastore does not provide this option. Also, denoiseImageDataset cannot directly combined with augmentedImageDatastore. It is suggested to try creating a custom datastore by following the documentation below:

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!