Is there a way to visualize augmented image data created by imageDataAugmenter()?

Technical Source
2 min readApr 1, 2022

I would like to confirm a few images just to understand what imageDataAugmenter does. Is there a way to visualize the augmented image data created by the imageDataAugmenter?

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

For R2018a.

In R2018a, the ‘augmentedImageSource’ has been replaced by ‘augmentedImageDatastore’ and the ‘preview’ method can be used to preview the data as follows:

augimds = augmentedImageDatastore(…)
ims = augimds.preview();
montage(ims{1:6,1}) % to visualize 6 images

‘preview’ does not reset the datastore.

In alternative, the method ‘read’ can be used to view the next batch of data as shown below:

augimds = augmentedImageDatastore(…);
numBatches = ceil(augimds.NumObservations / augimds.MiniBatchSize);
for i = 1:numBatches
ims = augimds.read();
montage(ims{:,1});
pause;
end
augimds.reset();

____________________________________________________________________________________________________________________

For R2017b:

The built-in functionality to do this is not available on Neural Network Toolbox (R2017b).

1) One of the possible workarounds is to make use of augmentedImageSource’s hidden methods and properties for iterating over the data. For example:

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.