Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ples expline this codes and write to me what is the classification expline the using of agumented image datastore and why using this Zocreate ImageDatastore

ples expline this codes
and write to me what is the classification
expline the using of agumented image datastore
and why using this image text in transcribed
image text in transcribed
image text in transcribed
Zocreate ImageDatastore for CNN . inds i imageDatastore(fullfile(dataFolder, categories), 'Labelsource', 'follernames'); tbl countEachlabel (imds) 3 devide data to the troin and test [indsTrain,imdstest] = spliteachLabel (inds, 0.90, 'randomized'); numtraintmages = nume1 (imdstrain.Labels); 8 Extract the class labels from the training and test data. counteachLabel (imds Train) 6. numitrages Train = numel (imdsTrain.Labels); Qi idx inandperm(numtralnImages, 16); . I Iatile( inds, "Frames', Idx); i figure Binchow (I) iscal1 Alextlet Network. net = alexnet; analyzenetwork (net); 6 export the features from layer 7 netway ers: * figure \% imshow(I) Wcall AlexNet Network. net = alexnet; analyzeNetwork(net); % export the features from layer 7 net.Layers; layer = "fc7"; \% format each image to 227227.3 because its the size that can be deal with Alexket outputsize=[ [2272273]; auimdstrain = augmentedimageDatastore (outputsize, imds Train, 'Colorpreprocessaing', 'gray2rgb'); auimdstest = augmentedImageDatastore(outputSize, imdsTest, 'Colorpreprocessing', 'gray2ggb') i \% feature extraction from layer 7 featurestrain = activations(net, auindstrain, layer, 'Outputas', "rons'); features Test = activations(net, Guindstest, layer, 'OutputAs', 'rons.'); % calculate number of examples for train and test YTrain = imdsTrain. Labels; \% Extract the class labels from the training and test data. VTest = inds Test, Labels; numClasses = numel (categonies) \% format each image to 2272273 because its the size that can be deal with AlexNet outputsize =[2272273]; auimdstrain = augmentedimageDatastore (outputSize, imds Train, 'Colorpreprocessing ', 'gray2rgb'); auindstest = augmentedimageDatastore(outputsize, indstest, 'Colorpreprocessing", "gray2rgb'); 9 feature extraction from layer 7 featurestrain = activations (net, auindstrain, layer, 'outputAs', ' rows'); featurestest - activations (net, auimdstest, layer, outputAs, , rows'); ine 7 calculate number of examples for troin and test Yrrain - imdsTrain. Labels; Y Extract the class lobels from the training and test data. YTest indstest. Labels: numclasses = numel (categories) fingure) tic Svirid = fitcecocfeatunesTrain, yTrain)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions