Build a cnn classifier to recognize hand-written digits

Assignment Help Computer Engineering
Reference no: EM133975447

Information Security and Assurance in a Networked World

Assignment

Part 1. Image Representation

There are 10 images in a collection saved under the compressed file IA3.zip. All of these images are in .png format. In this assignment, you are asked to process these images, so that they will be converted to arrays as the final output. In particular, please follow the steps below:

1. Read in all 10 images in python, resize each of them to 100 by 100 pixels format.

2. Convert each of them to greyscale arrays (no color information needs to be kept, so the arrays will be 2-D).

3. Flatten the 2-D array for each image to a 1-D array (vectors), draw a histogram to present the intensity value distribution for each of the images.

4. Conduct a histogram equalization to normalize each image, draw a histogram to present the intensity value distribution of each of the images after normalization.

5. Compare the histogram in step 4 with step 3, discuss what the difference is.

hint: you may consider using "for" loops, so you could process the whole collection at once.

For Part 1, please submit two files:

A Jupyter Notebook file .ipynb which includes your python code with your comments # or markdowns, and the results of each successful running through. Use a markdown at the end of the .ipynb file to answer the question in step 5. Enjoy trusted, budget-friendly assignment help from today onward!
A CSV file which contains flattened arrays (step 3), each image should be a row, and there should be 100*100 columns.

Part 2. CNN - Digit Recognition

We will build a CNN classifier to recognize hand-written digits 0-9. We are using the mnist (Modified National Institute of Standards and Technology) dataset, which can be loaded by: (train_digits, train_labels), (test_digits, test_labels) = datasets.mnist.load_data() It contains black and white images (28 x 28 pixels) and their labels of hand-written digit (60,000 in training set and 10,000 in test set).

1. Plot the first 9 images:

2296_Digit Recognition.jpg

 

Use plt.title() to display the labels with the format "Digit: 5" for example. You may
want to use fig = plt.figure(layout='tight') to avoid overlaps

2. Prepare the data by:
train_digits = train_digits.reshape(60000,28,28,1) train_labels = tf.keras.utils.to_categorical(train_labels, 10) Do the same for the test set.

3. Build your CNN model with Conv2D with (3, 3) filters and MaxPooling2D((2, 2)). Show the summary of your model. You may want to set the output layer as: model.add(layers.Dense(10, activation='softmax'))

4. Compile and train your model. Consider the choices of optimizer, loss, and epochs. What are your accuracy and val_accuracy? You may want to set the loss as: loss=tf.keras.losses.CategoricalCrossentropy()

5. Plot the history of model training against epoch.

6. Evaluate the model with the test data. For Part 2, please submit one file:

A Jupyter Notebook file .ipynb which include your python code with your comments # or markdowns, and the results of each successful running through.

Reference no: EM133975447

Questions Cloud

How should xyz ltd identify the performance obligations : The customer cannot use the machinery until it has installed. According to AASB 15, how should XYZ Ltd. identify the performance obligations in this contract?
Calculate any deductions available to frank relating : Calculate any deductions available to Frank relating to this loan for the 2022/23 tax year including borrowing costs.
How can risk assessment and hazard mapping enhance community : How can risk assessment and hazard mapping enhance community preparedness for geologic hazards? Provide examples of successful implementation of these tools.
Develop a more nuanced view of current issues of politics : This homework is about nurturing understanding of political culture which can help us develop a more nuanced view of current issues of politics and government.
Build a cnn classifier to recognize hand-written digits : Build a CNN classifier to recognize hand-written digits 0-9. We are using the mnist (Modified National Institute of Standards and Technology) dataset
What is recommended period for booster shots : What is the recommended period for booster shots. What is the life cycle of this organism? How can this organism be detected?
How do the issues raised in the sources reflect : How do the issues raised in the sources reflect the influence of the hybrid subculture traditionalism-individualism, and patterns of business dominance?
Identify sport management issue best suited to address : Brief explanation of why the research question is of significance. Identify sport management issue best suited to address the research question
What are the key steps of two types of cellular reproduction : What are the key steps of these two types of cellular reproduction? How does the behavior of chromosomes during meiosis generate variation?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd