https://jp.mathworks.com/help/deeplearning/ug/try-deep-learning-in-10-lines-of-matlab-code.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
camera = webcam; % Connect to the camera | |
%preview(camera); | |
net = alexnet; % Load the neural networ k | |
im = snapshot(camera); % Take a picture | |
image(im) % Show the picture | |
im = imresize(im,[227 227]); % Resize the picture for alexnet | |
label = classify(net,im); % Classify the picture | |
title(char(label),'FontSize',50) % Show the class label | |
drawnow | |
clear camera |
0 件のコメント:
コメントを投稿