TagPyBrains

Image Recognition Tool

As I’ve recently got quite into machine learning tools I’ve written a small GUI based tool that uses the PyBrains library to ‘learn’ a common theme from a folder of training data. To test new images, drag and drop them onto the tool to get a percentage of similarity to the test data.

The tool is written using Python, PyBrains, Glade2 and PyGTK so you need those libraries available.

The tool can be downloaded here – image_recognition_tool

Image Recognition with PyBrains

After recently completing the Machine Learning course from Stanford University on Coursera I’ve been preparing to give a small introduction to machine learning at work. Part of that is showing some demos of machine learning tools.

I made a character recognition neural network using the PyBrains Python library, it’s a great library and very fast but the documentation is very poor and examples are hard to come across. With enough digging I managed to put together something very simple and short.

In this example it reads in small PNG files of letters, extracts all of the pixel values and creates a 1D array of the values, this is used to train the neural network through back propagation. I test the network on one of the inputs. Each input is classified with a number in the addSample function, this takes the flattened array and a number (unfortunately it does not take a string as a classification). If you run the application you will see that, for example when using b.png as a test, it will return a value close to 2.

You can download the images I used here – Machine Learning Training Characters.

 

© 2021 Acodemics

Theme by Anders NorénUp ↑