6 To test our own images of digits, Code Extract: we need to use some functions resize from skimage.transform import of the SCIKIT-IMAGE module io from skimage import beforehand. ... Answer the following questions img = io.imread(testImage.png, True) from the code: resize(img, img = (8,8), mode='reflect') img = (1-img) * 16 vector = img.reshape((1,64)) print(classifier.predict(vector)) A. What does do imread() A. Answer: when we pass run this function with the 'testImage.png' image file, and the word 'True'? B. Answer: B. The functions and resize() are performed to reshape() resize and reshape the images. Why do we need to do this? C. Fill in the blanks in this C. is a long _________ of pixels. The function 'vector' sentence. will then predict the ___________ of the classifier.predict() 7 Test the code using your own A. On a separate page, using a black marker write digits 0 to 4 like images of digits. below, four times. This will make a total of 20 images of digits. (* Hint, use different handwriting, or handwriting from a different student)
6 To test our own images of digits, we need to use some functions of the SCIKIT-IMAGE module beforehand. Answer the following questions from the code: A. What does imread() do when we pass run this function with the 'testImage.png' image file, and the word 'True'? B. The functions resize() and reshape() are performed to resize and reshape the images. Why do we need to do this? C. Fill in the blanks in this sentence. Code Extract: from skimage.transform import resize from skimage import io ... img = io.imread(testImage.png, True) img = resize(img, (8,8), mode='reflect') img = (1-img) * 16 vector = img.reshape((1,64)) print(classifier.predict(vector)) A. Answer: B. Answer: C. 'vector' is a long _________ of pixels. The function classifier.predict() will then predict the ___________ of the 7 Test the code using your own images of digits. A. On a separate page, using a black marker write digits 0 to 4 like below, four times. This will make a total of 20 images of digits. (* Hint, use different handwriting, or handwriting from a different student)
CS-G10-T3%20-%20Project%20SV%20%281%29.docx