예제_웹캠을 이용한 전이학습 딥러닝(Googlenet)
deepNetworkDesigner camera = webcam; inputSize = trainedNetwork_1.Layers(1).InputSize(1:2) h = figure; h.Position(3) = 2*h.Position(3); ax1 = subplot(1,2,1); ax2 = subplot(1,2,2); im = snapshot(camera); image(ax1, im) im = imresize(im,inputSize); [YPred, probs] = classify(trainedNetwork_1, im); imshow(im) label = YPred; title(string(label) + ", " + num2str(100*max(probs),3) + "%"); [~,idx] = sor..
예제_우유 판별하는 딥러닝 만들어보기(Alexnet)
0. 참고 영상 https://www.youtube.com/watch?v=60cllAUWIvI 1. 데이터 수집 구글에서 흰우유, 초코우유, 바나나우유, 딸기우유 4개의 카테고리에 각각 15장의 jpg사진을 수집함. 2. 데이터 불러오기 editior: MATLAB 라이브 스크립트 이용 imds = imageDatastore('우유', 'IncludeSubfolders',true, 'LabelSource','foldernames'); [imdsTrain, imdsValidation] = splitEachLabel(imds, 0.7, 'randomized'); 3. 이미지 확인 numTrainImages = numel(imdsTrain.Labels); idx = randperm(numTrainImages,..