denoisingImageDatastore
Denoising image datastore
Description
Use a denoisingImageDatastore
object to generate batches of
noisy image patches and corresponding noise patches from images in an
ImageDatastore
. The patches are used to train a denoising deep
neural network.
This object requires that you have Deep Learning Toolbox™.
Note
When you use a denoising image datastore as a source of training data, the
datastore adds random noise to the image patches for each epoch, so that each epoch
uses a slightly different data set. The actual number of training images at each
epoch is increased by a factor of PatchesPerImage
. The noisy image patches and
corresponding noise patches are not stored in memory.
Creation
Description
dnimds = denoisingImageDatastore(
creates a denoising image datastore, imds
)dnimds
using images from
image datastore imds
. To generate noisy image patches, the
denoising image datastore randomly crops pristine images from
imds
then adds zero-mean Gaussian white noise with a
standard deviation of 0.1
to the image patches.
dnimds = denoisingImageDatastore(
uses name-value pairs to specify the two-dimensional image patch size or to set
the imds
,Name,Value
)PatchesPerImage
, GaussianNoiseLevel
, ChannelFormat
, and DispatchInBackground
properties. You can specify
multiple name-value pairs. Enclose each argument or property name in
quotes.
For example,
denoisingImageDatastore(imds,'PatchesPerImage',40)
creates a denoising image datastore and randomly generates 40 noisy patches from
each image in the image datastore, imds
.
Input Arguments
Properties
Object Functions
combine | Combine data from multiple datastores |
hasdata | Determine if data is available to read |
partitionByIndex | Partition denoisingImageDatastore according to
indices |
preview | Preview subset of data in datastore |
read | Read data from denoisingImageDatastore |
readall | Read all data in datastore |
readByIndex | Read data specified by index from
denoisingImageDatastore |
reset | Reset datastore to initial state |
shuffle | Shuffle data in datastore |
transform | Transform datastore |
isPartitionable | Determine whether datastore is partitionable |
isShuffleable | Determine whether datastore is shuffleable |
Examples
Tips
Training a deep neural network for a range of Gaussian noise standard deviations is a much more difficult problem than training a network for a single Gaussian noise standard deviation. You should create more patches compared to a single noise level case, and training might take more time.
To visualize the data in a denoising image datastore, you can use the
preview
function, which returns a subset of data in a table. Theinput
variable contains the noisy image patches and theresponse
variable contains the corresponding noise patches. Visualize all of the noisy image patches or noise patches in the same figure by using themontage
function. For example, this code displays data in a denoising image datastore calleddnimds
.minibatch = preview(dnimds); montage(minibatch.input) figure montage(minibatch.response)
Each time images are read from the denoising image datastore, a different random amount of Gaussian noise is added to each image.
Version History
Introduced in R2018a
See Also
denoiseImage
| denoisingNetwork
| dnCNNLayers
| trainNetwork
(Deep Learning Toolbox)