Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please explain this codes in details clear: cla; 3kread hand images. dataFolder = 'Dataset'; % select the categories from folder label directorycontent =dir (dataFolder); dirflags

please explain this codes in details
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
clear: cla; 3kread hand images. dataFolder = 'Dataset'; \% select the categories from folder label directorycontent =dir (dataFolder); dirflags = [directoryContent,isdir]; subfolders = directoryContent(dirFlags); categories - cell( 1,1 ength(subfolders )2); for k = 3 : length(subfolders) categorles {k2} - [subfolders (k), nane] subPath=fullfile(datafolder, subfolders (k), name, "I'); end W\%create Imagedatastore for CCN . imds = imagedatastore(fullfile(datafolder, categories), 'Labelsource', 'foldernames'); tbl= countEachLabel (inds) T devide data to the troin and test [imds Train, imdstest] = splitEachLabel(imds, 0.98, "randonized"); numTrainimages - numel(imdstrain. Labels); \$ Extract the class labels from the training and test data. count fachLabel (imds Train) x numinagestrain = numel(imds Train.tabels); x idx - randperm(numtrainImages, 16): x XI = imtile( Inds, 'Frames', 1dx) : x figure x inshow (I) Xcall Alexvet Network. net = alexnet; analyzeHetwork(net): X export the featuras from layer ? figure; tic svmMd - fitcecoc(featurestrain, YTrain); \%Training svmPredicate - predict(svmMd, featurestest); Testing * idx=[151015]; \% figure for i=1 : numel (idx) subplot (2,2,1) I - readimage(imdstest, idx(1)); label = svmpredicate (idx(i)); imshow (I)

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_2

Step: 3

blur-text-image_3

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

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions