Main Content


Read first row of data in datastore



preview(ds) returns the first row of data in the input datastore.


collapse all

Load training data that contains bounding boxes with labels for a vehicles class.

data = load('vehicleTrainingData.mat');
trainingData = data.vehicleTrainingData;

Add the fullpath to the local vehicle data folder.

dataDir = fullfile(toolboxdir('vision'),'visiondata');
trainingData.imageFilename = fullfile(dataDir,trainingData.imageFilename);
blds = boxLabelDatastore(trainingData(:,2:end));

Preview the data from the box label datastore.

ans=1×2 cell array
    {[126 78 20 16]}    {[vehicle]}

Input Arguments

collapse all

Datastore with labeled data for training a semantic segmentation network or an object detection network, specified as a boxLabelDatastore or a pixelLabelDatastore object.

Introduced in R2020a