DEV Community

Cover image for Digit Recognition Using Neural Network in JavaScript
Victor Ribeiro
Victor Ribeiro

Posted on • Originally published at github.com

Digit Recognition Using Neural Network in JavaScript

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

Top comments (9)

Collapse
 
michaeltharrington profile image
Michael Tharrington

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 • 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

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

The MNIST data set

Collapse
 
raslanove profile image
raslanove

Did you use pixels for features?

Thread Thread
 
victorqribeiro profile image
Victor Ribeiro

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

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