pixelLabelImageDatastore
(To be removed) Datastore for semantic segmentation networks
pixelLabelImageDatastore will be removed in a future release. Use the
imageDatastore and pixelLabelDatastore objects and the combine
function instead.
Description
Use pixelLabelImageDatastore to create a datastore for
training a semantic segmentation network using deep learning.
Creation
Syntax
Description
returns a datastore for training a semantic segmentation network based on the
input pximds = pixelLabelImageDatastore(gTruth)groundTruth object or array of
groundTruth objects. Use the output
pixelLabelImageDatastore object with the trainnet (Deep Learning Toolbox) function to train convolutional neural networks for
semantic segmentation.
returns a datastore based on the input image datastore and the pixel label
datastore objects. pximds = pixelLabelImageDatastore(imds,pxds)imds is an ImageDatastore object that
represents the training input to the network. pxds is a
PixelLabelDatastore object that represents the required network
output.
additionally uses name-value arguments to set the pximds = pixelLabelImageDatastore(___,Name,Value)DispatchInBackground and OutputSizeMode properties. For 2-D data, you can
also use name-value pairs to specify the ColorPreprocessing, DataAugmentation, and OutputSize augmentation properties. You can
specify multiple name-value arguments.
For example,
pixelLabelImageDatastore(gTruth,'PatchesPerImage',40)
creates a pixel label image datastore that randomly generates 40 patches from
each ground truth object in gTruth.
Input Arguments
Properties
Object Functions
combine | Combine data from multiple datastores |
countEachLabel | Count occurrence of pixel or box labels |
hasdata | Determine if data is available to read |
partitionByIndex | (To be removed) Partition pixelLabelImageDatastore according
to indices |
preview | Preview subset of data in datastore |
read | Read data from label datastore |
readall | Read all data in datastore |
readByIndex | (To be removed) Read data specified by index from
pixelLabelImageDatastore |
reset | Reset datastore to initial state |
shuffle | Return shuffled version of label datastore |
transform | Transform datastore |
Examples
Tips
The
pixelLabelDatastorepxdsand theimageDatastoreimdsstore files that are located in a folder in lexicographical order. For example, if you have twelve files named'file1.jpg','file2.jpg', … ,'file11.jpg', and'file12.jpg', then the files are stored in this order:Files that are stored in a cell array are read in the same order as they are stored.'file1.jpg''file10.jpg''file11.jpg''file12.jpg''file2.jpg''file3.jpg'...'file9.jpg'If the order of files in
pxdsandimdsare not the same, then you may encounter a mismatch when you read a ground truth image and corresponding label data using apixelLabelImageDatastore. If this occurs, then rename the pixel label files so that they have the correct order. For example, rename'file1.jpg', … ,'file9.jpg'to'file01.jpg', …,'file09.jpg'.To extract semantic segmentation data from a
groundTruthobject generated by the Video Labeler, use thepixelLabelTrainingDatafunction.
Version History
Introduced in R2018aSee Also
Functions
Objects
Topics
- Get Started with Semantic Segmentation Using Deep Learning
- Datastores for Deep Learning (Deep Learning Toolbox)
- Deep Learning in MATLAB (Deep Learning Toolbox)