How to add noise to an augmentedImageDatastore for neural network training

1 回表示 (過去 30 日間)
Noé HIRSCHAUER
Noé HIRSCHAUER 2023 年 5 月 23 日
コメント済み: Noé HIRSCHAUER 2023 年 6 月 9 日
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?

採用された回答

Ranjeet
Ranjeet 2023 年 6 月 7 日
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:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by