Handwritten Digit Prediction (MNIST) Webpage
- 7 Devlogs
- 22 Total hours
A web app that allows users to snap a picture of a number and get a prediction on what number the number is. Original purpose is to demonstrate machine learning.
A web app that allows users to snap a picture of a number and get a prediction on what number the number is. Original purpose is to demonstrate machine learning.
When using this project there can be a lot of issues such as bad lighting, no accessible black on white resources, etc. And I was actually inspired to add this when I was walking around school and I saw that most of the numbers in places were white numbers on a dark background. So I thought why not make this program be able to read those?
This took me surprising not as long as I thought it would take. I spend a quick 20-30 minutes making a rough draft, then I did the typescript, and in the end I styled it and tested it out and 3 hours is great honestly by my standards.
Signing off,
Ash-ioL
My ship had changes requested to it to not deploy the project on services like render that go to sleep and take a minute to wake up.
I switched to vercel’s serverless function which doesn’t have that issue. I had to swap out my requirements for packages to more lightweight versions of them in order to make it compatible for this deployment. It took a couple of tinkering.
Signing off,
Ashwath Arasuraj Sankar
I spend the majority of my time in the preprocessing code trying to get it to work. I tried things like finding contours, adaptive threshold, and other things but I ended up just using thresh otsu and multiplying that threshold value by something near 2 and it ended up working out.
After that I was setting up cors allowed origins with the production domain, and I went through all my css and made sure its responsive and supports mobile devices.
My biggest challenge was honestly finding time to do this. I’m taking a heavy classload this year and with other commitments I could only squeeze out like an hour of my afternoon on this every day and I worked on it mostly in class and during lunch. But however it bugged me so much (and still does) of how fragile this model is to shadows and such, although I made it less impactful.
Signing off,
Ash-ioL
I created a simple loading screen to transition into the final result after the image is uploaded. For the loading screen I just put the image they uploaded and underneath it the name of the image they uploaded. For the animated ray, I used a parent container to remove overflow and a pseudo-element to have the moving ray. The biggest challenge was messing around with the perfect amounts of blur, opacity, ray width, and direction to make it look put together.
I also started working on the results UI. It displays the preprocessed image, prediction, confidence score, and some information about the pipeline behind this project. Since I am done with the UI, now I just need to use the fetch api in Javascript to get the response and feed it into the results. And some other polishing.
In the backend, I still need to fix the preprocessing bug but I figured it would be easier to debug if I finish the frontend first since I can use it as a tool to take a picture and see what it gives.
So I added a footer in the bottom with social links and in the top I added a logo, along with a big transparent one in the background. I also made the file input button a html file input tag so it utilizes the file inputting and camera use. I’ve really just been adding stuff and not worrying too much about organization. I’m hoping I’ll be done with the project before that impacts me.
Signing off,
Ash-ioL
I generated the svgs for the icons and the diagrams with AI. I manually did the colors and layout. Next I am going to make it responsive and compatible with phones. After that, I need to fix an issue with the preprocessing of the image in the backend.
Testing it out was kind of a hassle with taking a picture, uploading it to drive, using my laptop to send it to the model. But since I tested it out, I was able to know that something was wrong.
I completed the API part of the project. It allows users send a post request with the image and gives the prediction as the response.
I also have it deployed publicly.
I spent a huge amount of time in the preprocessing step for the image since there were a lot of steps involved and lots of places for things to go wrong.
Started testing with a frontend to make sure it works but I haven’t added any elements to it yet.
Signing off,
Ash-ioL