Matlab learning realizes deep learning to identify objects

clear;
camera=webcam; %Open the camera
nnet=alexnet;%load neural network,alexnet is a CNN,artist train it as millison of picture
%make a circle to reload frame from camera
while true 
    picture=camera.snapshot;%will camera The picture information amplitude is given to picture
    picture=imresize(picture,[227,227]);% change the picture size
    label=classify(nnet,picture);% compare the picture with nnet, find the matching result
    image(picture);% display the picture
    title( char(label));% display label
    drawnow;
end
 

Guess you like

Origin blog.csdn.net/seek97/article/details/90144204