how to domenstrate the name of the classes which the images belong to after testing the neural network with real world data?

1 次查看(过去 30 天)
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.

采纳的回答

Greg Heath
Greg Heath 2016-7-15
% 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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by