Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THis is the cleaned up version of the digit recognizer app we developed (not finished yet) last week. The project is in github. Here's the

THis is the cleaned up version of the digit recognizer app we developed (not finished yet) last week.  The project is in github. Here's the link: https://github.com/arjangcore/DigitRecognizer  

You will need vscode and python 8.* (latest version ) to run this. Download the project and use it as starting code.

It currently does not do any learning, but the server and the front end app are working and connected as required.  Currently test always returns "1" as detected digit. We will complete the app this week. To test it run the python server in vs code. Then launch DigitRecognizer.html (preferably in Go Live ) and test the training and also testing part. Your tasks for this week are the followings:

1) Currently training batch size is one. Modify the app both on the server and client side to accommodate as many as we like. For this, add a new button to the page naming it "Send" that will send the batch of training sets to the server. This means we can draw one digit at a time and type the digit in the input area and then press "train". Then do it as many times as we like. THen press "Send" to send it to server for training. 

2) On the server side, keep track of how may training set we have given to the system so far for each digit. This way, we can  have estimation of how fast the learning is happening later when we hook up the Neural Network learner to the system this week. The number of learning set for a digit should be returned every time we perform a "test". For example for test of digit 2, server should send the response: "digit 2 is detected after learning 64 samples". Here 64 means we have given to the system 64 training sets for digit 2. 

3) We want to save our training sets to a text file, so we can later load them back. In Numpy you can save and load using savetxt() and loadtxt(). Currently there is commented out code in servery.py which loads saved data.csv and datalabels.csv. Uncomment them and test them by printing out how many test samples are in data (remember datalabels.csv are the labels for the test images in data.csv). This sample data set already exist in the attached project. But we want to create another pair (userData.csv and userLabels.csv) for saving out user's input data. Do a bit research to learn how to save out numpy data using savetxt(). Here's a good tutorial for doing that : https://machinelearningmastery.com/how-to-save-a-numpy-array-to-file-for-machine-learning/ 

Do testing to make sure your implementation actually works, by saving user data after each batch of training data sent from client. Then if you restart the server you should see the same number of user data sets are loaded back using your code and the saved out datasets.

Bring any question or problem you have to next week class. We will complete it together by adding NN back end to it.


Step by Step Solution

3.30 Rating (156 Votes )

There are 3 Steps involved in it

Step: 1

from DigitRecognizer import emojify import httpsgithubcomarjangcoreDigitReco... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Calculus

Authors: Dale Varberg, Edwin J. Purcell, Steven E. Rigdon

9th edition

131429248, 978-0131429246

More Books

Students also viewed these Programming questions