Datastore for image data
Use an ImageDatastore
object to manage a collection of
image files, where each individual image fits in memory, but the entire collection of
images does not necessarily fit. You can create an ImageDatastore
object using the imageDatastore
function, specify its properties, and
then import and process the data using object functions.
creates a datastore imds
= imageDatastore(location
)imds
from the collection of image data
specified by location
.
specifies additional parameters and properties for imds
= imageDatastore(location
,Name,Value
)imds
using one or more name-value
pair arguments.
countEachLabel | Count files in ImageDatastore labels |
hasdata | Determine if data is available to read |
numpartitions | Number of datastore partitions |
partition | Partition a datastore |
preview | Preview subset of data in datastore |
read | Read data in datastore |
readall | Read all data in datastore |
readimage | Read specified image from datastore |
writeall | Write datastore to files |
reset | Reset datastore to initial state |
shuffle | Shuffle all data in datastore |
splitEachLabel | Split ImageDatastore labels by proportions |
subset | Create subset of datastore or file-set |
transform | Transform datastore |
combine | Combine data from multiple datastores |
isPartitionable | Determine whether datastore is partitionable |
isShuffleable | Determine whether datastore is shuffleable |
Using ReadFcn to transform or
pre-process 2-D images is not recommended. For file formats recognized by
imformats
, specifying
ReadFcn
slows down the performance of
imageDatastore
. For more efficient ways to transform and
pre-process images, see Preprocess Images for Deep Learning (Deep Learning Toolbox).