フィルターのクリア

Training neural networks based on images

2 ビュー (過去 30 日間)
i Venky
i Venky 2011 年 10 月 9 日
回答済み: padmavathi vattikonda 2016 年 12 月 19 日
I trained neural networks with images as inputs. I was not sure how to do that. I did like this
a=imread('A.bmp'); %I have these image files
b=imread('B.bmp');
a=a(:); %To convert this into one column matrix
b=b(:);
x=[a b];
x1=double(x); %Input to the neural network
t=eye(2); %Target and there are two classes 'a' and 'b'
After this I trained the neural network(pattern recognition) and then it got trained and I stored the network in 'net'.
After this I tried this code to check my neural network
input=a; output=sim(net,input);
I got this error
Error in ==> network.sim>simargs at 236 switch class(P)
??? Output argument "Pi" (and maybe others) not assigned during call to "D:\MATLAB\toolbox\nnet\nnet\@network\sim.m>simargs".
Error in ==> network.sim at 173 case 2, [err,X,Xi,Ai,T,Q,TS,matrixForm] = simargs(net,X);
What is the problem? Is there any other way to solve my question which is training neural networks based on images.
Basically I don't know that much about neural networks in matlab so I would like to know if there is any tool in neural network that is specially used for image recognition.
NOTE: I trained neural networks without using images (just using normal sequences) and it worked perfectly. But I don't get the same for images. Plz help me.

採用された回答

Walter Roberson
Walter Roberson 2011 年 10 月 9 日
This has been asked by several people in several years, but solid answers seem to be scarce on this.
I did find a posting in which one person discovered that things started to work for them when they changed their input data type to double. See http://www.mathworks.com/matlabcentral/newsreader/view_thread/99987
Notice that in your code, "a" is still the data type of the original image.
  1 件のコメント
i Venky
i Venky 2011 年 10 月 9 日
Thanks mate. I changed that to double and it worked.

サインインしてコメントする。

その他の回答 (1 件)

padmavathi vattikonda
padmavathi vattikonda 2016 年 12 月 19 日
how to give an image as input for neural network and how to train it in matlab

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by