DEV Community

loading...
Cover image for Digit Recognition Using Neural Network in JavaScript

Digit Recognition Using Neural Network in JavaScript

victorqribeiro profile image Victor Ribeiro Originally published at github.com ・1 min read

Digit Recognition

Implementation of a digit recognition using my neural network with MNIST

Digit Recognition

Live version here

About

I made this to test how long it would take to train my neural network with MNIST and accurate it would be at the end. Turns out I have a long way to go.

How to use it

Draw the digit on the white rectangle (try to use to whole area) and press predict for the neural network indentify the digit. Press clear to clear the white drawing area.

Check out the code here

Discussion (9)

pic
Editor guide
Collapse
michaeltharrington profile image
Michael Tharrington (he/him)

Love it!

It was actually working really well for me, until I threw it a curve ball with a seriffed 1.

Collapse
victorqribeiro profile image
Victor Ribeiro Author • Edited

Someone made an example using Tensor Flow a while back. Theirs are not perfect either. Mighty have something to do with MNIST data set.

img

gogul09.github.io/software/digit-r...

Collapse
victorqribeiro profile image
Victor Ribeiro Author

Yeah, some times it does that. To be honest the error on the training it is still high, but it was taking too long to converge.

Collapse
raslanove profile image
raslanove

The live version doesn't perform well. What features did you use to train this network?

Collapse
victorqribeiro profile image
Victor Ribeiro Author

The MNIST data set

Collapse
raslanove profile image
raslanove

Did you use pixels for features?

Thread Thread
victorqribeiro profile image
Victor Ribeiro Author

Yes, indeed that's how you train a neural network with images.

Thread Thread
raslanove profile image
raslanove

Doesn't feel very resilient, though.

Thread Thread
victorqribeiro profile image
Victor Ribeiro Author

I've updated the code to use the last version of my neural network. It's a little better this time.