how to domenstrate the name of the classes which the images belong to after testing the neural network with real world data?
1 view (last 30 days)
Show older comments
Hadeer tawfik
on 11 Jul 2016
Commented: Hadeer tawfik
on 16 Jul 2016
Hello,I have been working with neural network tool box to classify images of cataract and non cataract eye images.I have created the feature vector (GLCM) and defined the target vector which describes 3 classes (non-cataract, grade 1 cataract, grade 2 cataract).Then i have trained the network and saved it as net.mat.so my intention is to create an application where the user will upload an image and the application will tell him if his images has which grade of cataract... my questions are:
1) Is there a way to name the target classes instead of giving it numeric values?
2) how to tell the user that the image he has belong to class of ( grade1 cataract,, etc) using the net.mat ?
3) Is there a way to make the neural network plot to me to which class every image belongs to ?
4) will i need to automatically generate feature vector for every image the user will uplaod and pass it to net.mat?
Thank you so much in advance.
0 Comments
Accepted Answer
Greg Heath
on 15 Jul 2016
% how to domenstrate the name of the classes which the % images belong to after testing the neural network with % real world data? % Asked by Hadeer tawfik on 11 Jul 2016 at 1:43
% 1) Is there a way to name the target classes instead of giving it numeric values?
Yes. But why bother? 0, 1 and 2 are as clear as you can get.
However, the target matrix should have 3-dimensional {0 1} unit vectors obtained from the class indices [ 1 2 3 ]
truclassind = [ 2 1 0 1 2 ]
target = full(ind2vec(1+classind))
Then the estimated classindices are obtained from the output
estclassind = vec2ind(output)-1
% 2) how to tell the user that the image he has belong to class of ( grade1 cataract,, etc) using the net.mat ?
output = net(input)
% 3) Is there a way to make the neural network plot to me to which class every image belongs to ?
Yes, just plot the trueclassind 'bo' and estclassind 'x'
% 4) will i need to automatically generate feature vector for every image the user will upload and pass it to net.mat?
Either that or give the user the subroutine that extracts the conversion from the image.
Hope this helps.
Thank you for formally accepting my answer
Greg
More Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!