# Neural Network Does Your Homework

[Will Forfang] found a app that lets you take a picture of a math equation with a phone and ask for a solution. However, the app wouldn’t read handwritten equations, so [Will] decided to see how hard that would be, using a neural network.

The results are pretty impressive (you can also see the video below). [Will] used his own handwriting on a chalkboard and had the network train on that. He also went even further and added some heuristics to identify fraction bars and infer the grouping from the relative size of the bars.

The neural net code is simple, but there are a lot of nodes. The capture image is 75×75 or 5,626 pixels in total. Each pixel has a neuron. Those feed into 50 intermediate neurons. There there is one neuron for each of the eighteen symbols the software can recognize (the digits, math operators, and so on).

The programming is just to get the neuron algorithm. The actual character recognition is handled by training the net using example input data  — writing numbers over and over again on the chalkboard. Once the equation is recognized, it isn’t hard to solve the actual equation (which is not done via neural net, as far as we can tell).

We’ve seen neural nets doing speech generation, flying helicopters, and even spraying unwanted cats.

Thanks for the tip [John].

## 11 thoughts on “Neural Network Does Your Homework”

1. rasz_pl says:

> Each pixel has a neuron

I was about to scream bloody murder how wrong that is, but then I read the article, its not even CNN. Flattened input, sigmoids, this is so 5 years old tech. Intro to state of the art today done with couple python lines:

https://www.youtube.com/watch?v=vq2nnJ4g6N0

1. Rodrigo Loza says:

Yeah, I almost screamed as well when they said that each “pixel has a neuron”. But it is kind of true if you are working with a VGA image, then your input layer would have 307200 neurons to match the number of inputs to map.

This is indeed very old technology as there is a single hidden layer with 20 neurons!!! hahaha. But remember that it was state of the art when Yan Lecunn made it in the 90s.

Hackaday is great for hardware, but not really much for ML, DL or AI in general.

1. Leithoa says:

That’s a reflection of the tip line and the time of the staff. I’m sure if you post cool projects they’ll make their way into articles.

1. Ostracus says:

First person to create a terminator gets a HackaDay T-shirt, and an incredible write-up.

2. Even for hardware the quality of the articles here are very very smooth.

2. Aidan says:

Awesome lecture. I think you’ve got me started on a new interest/hobby. Thanks :-)

2. DV82XL says:

It may be based on older ideas but it’s still a nice little hack.

3. Tore Lund says:

Port it to google glasses and my daughter can be the 4’th grade math wiz .

4. Drone says:

Point this App at a normal arithmetic problem and it gives you a solution.
Point this App at a Common-Core arithmetic problem, and it gives you NOTHING. (Or maybe it sends you to a Progressive-Marxist Indoctrination propaganda site while logging everything about you for further surveillance?)

5. william says:

Hey, this is my project. Neat! There is a video of it solving algebra, too, if you follow the link. It’s not exactly groundbreaking work, but it was fun to make.

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.