I trying to develop a program using neural network to solve any real-life problem.
so, I took retinopathy detection using Probabilistic neural network using MATLAB. I took some help from professor and developed the program. I have trained the neural network and created the dataset but when testing the my neural network I m not getting output...
I'm new to MATLAB and this is the 1st program I wrote in MATLAB .
---THIS CODE IS TO CREATE TRANING DATASET---
clc;
clear all;
close all;
img=imread('nor4.jpg');
m=impixel(img);
dlmwrite('D:\Retinopathy detection\Training.csv',m,'-append');
%figure(1),imshow(img);
---CODE FOR ACTUCAL IMPLEMENTATION---
clc;
clear all;
close all;
fileID = fopen('Training.csv');
C = textscan(fileID,'%f%f%f%f','Delimiter',',');
fclose(fileID);
x=[C{1} C{2} C{3}];
t=[C{4}];
s=input('Enter spread : ');
net = newpnn(x',t',s);
img=imread('trr.jpg');
[m,n,p]=size(img);
R=img(:,:,1);
G=img(:,:,2);
B=img(:,:,3);
RR=reshape(R,m*n,1);
GG=reshape(G,m*n,1);
BB=reshape(B,m*n,1);
Xtest=double([RR GG BB]);
Y = sim(net,Xtest');
Im=reshape(Y,m,n);
for i=1:1:m
for j=1:1:n
if Im(i,j)==1
Newimg(i,j,:)=[230,166,122];
else
Newimg(i,j,:)=img(i,j,:);
end
end
end
figure(1),imshow(img);
figure(2),imshow(Newimg);
---sorry to share the whole code im not getting the error --
when I run this program ..I should get two image window one with input image and second window will have the retinopathy detected area ..
but when I run this program i'm getting on image window correct but...on the second window i'm only getting green color or if I change the value i'll get different color...
can you please help me out with this I'm really stuck !! I'm not getting help from my professor.
What I have tried:
i have tried to run the im getting wrong output