Matlab-使用经过训练的网络测试其他图像
|
我已经使用前馈神经网络训练了古代硬币图像。现在,我想使用经过训练的网络来测试图像。我做了如下:
load net.mat;
load Features.mat; %this is the test image\'s features file
testInputs = features_set\';
out = sim(net,testInputs);
[dummy, I]=max(out);
if (I == 1)
h = msgbox(\'type 1\',\'Description\',\'none\');
elseif (I == 2)
h = msgbox(\'type 2\',\'Description\',\'none\');
else
h = msgbox(\'unclassified\',\'Description\',\'none\');
end;
问题是,即使当我输入其他图像时,例如说一个人的脸,它也会说类型1或类型2。它不会显示未分类。始终为任何图像指定类型1或类型2,不仅对于硬币图像。
有人可以帮帮我吗?
没有找到相关结果
已邀请:
1 个回复
提孺局缎