close all ; % clear all; clc; resnet50(); outputFolder = fullfile( '/home/hyphen/Downloads' , 'data_road_224' ); imgDir = fullfile(outputFolder, 'training' , 'image_2' ); imds = imageDatastore(imgDir); %auimds = augmentedImageDatastore([375 1242 3],imds); I = readimage(imds,1); I = histeq(I); imshow(I) classNames = [ "rightroad" "leftroad" "environment" ]; labelIDs = kittiPixelLabelIDs(); labelDir = fullfile(outputFolder, 'training' , 'gt_image_2' ); % imds1 = imageDatastore(labelDir); % pxds1 = augmentedImageDatastore([375 1242 3],imds1); % % filename = '/tmp/data_road/training/gt1'; % pxds2 = imwrite(pxds1,filename); pxds = pixelLabelDatastore(labelDir,classNames,labelIDs); C = readimage(pxds,1); cmap = kittiColorMap; B = labeloverlay(I,C, 'ColorMap' ,cmap); imshow(B) pixelLabelColorbar(cmap,classNames); tbl = countEachLabel(pxds) % Prepare Training, Validation, and Test Sets...