使用Matlab进行图像分类
Classify images
Instructions are in the task pane to the left. Complete and submit each task one at a time.
Task 1
Load pretrained network
deepnet = alexnet;
Do not edit. This code imports and displays the image in file01.jpg.
img1 = imread('file01.jpg')
imshow(img1)
Task 2
Classify an image
pred1 = classify(deepnet, img1)
This code imports and displays the images in file02.jpg and file03.jpg.
img2 = imread('file02.jpg');
imshow(img2)
img3 = imread('file03.jpg');
imshow(img3)
Task 3
Classify further images
img2 = imread('file02.jpg');
imshow(img2)
pred2 = classify(deepnet, img2)
img3 = imread('file03.jpg');
imshow(img3)
pred3 = classify(deepnet, img3)
Talk is cheap. Show me the code