Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
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
Posted
Updated 13-Aug-19 7:25am
v2
Comments
[no name] 13-Aug-19 20:01pm    
"Demand" your "professor" helps you out. That's what you are paying for. No?
Parth_k 15-Aug-19 8:33am    
It's my own project..which I'm working on!! He(professor) don't know much about MATLAB ...so I asked here!!

I don't need someone to write my whole code..just wanted to know..where m I wrong !!..for me MATLAB is also new ...soo I'm curious to know
ZurdoDev 15-Aug-19 7:28am    
What he said ^.

It's unlikely that anyone here is going to do all the work for you. You need to debug it and narrow down the problem.
Parth_k 15-Aug-19 8:33am    
I have tried it sir!!
I have had came know that my dataset is not properly made!! After doing that also... I'm getting the same problem!! ...

Soo I was like it's better to have a EXPERT advice or suggestions to clear the error
ZurdoDev 15-Aug-19 8:35am    
We can't run your code so what exactly are you expecting someone to do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900