matlab學習之實現深度學習辨識物體

clear;
camera=webcam; %打開攝像頭
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;%將攝像頭圖片信息幅值給picture
    picture=imresize(picture,[227,227]);%改變圖片尺寸大小
    label=classify(nnet,picture);%圖片與nnet對比,尋找匹配結果
    image(picture);%顯示圖片
    title(char(label));%顯示標籤
    drawnow;
end
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章