About this project
PyID - Supports OS X, Windows and Linux (Any platform which supports Python)
Although the project title says it's for the Raspberry Pi, it can be run on any platform which supports Python.
The code will be released under MIT Licence, so that it will have minimal restrictions for use.
Hello everyone, I’m Migel, and this is PyID.
PyID is a cutting edge machine-learning algorithm based on a novel neural network architecture written in Python. The neural network has been trained to recognise hand-written digits (0-9), but it can be trained on any compatible dataset with minor modifications to the source code.
I’ve been a robotics enthusiast for years. I have created autonomous mobile robots, GPS navigation algorithms, bio-inspired FPGA architectures, and brain-machine interfaces. But now I am doing something that I have been dreaming for years. I am currently a PhD student studying machine intelligence. I am passionate about intelligent systems. I take inspiration from neuroscience, and combine the best approaches from machine learning to create powerful intelligent systems. And now I am here to share with you an algorithm that I have created.
PyID was written with a simple goal in mind – To bring some intelligence in to the most popular mobile computing platform. Over the past year alone I have seen some amazingly cool products coming out of the community with the Pi. But most of them lack intelligence. And by no means it is wrongdoings of the creators – it’s just that until now, there have not been an easy to implement source code or a package - They haven’t had the support from right researchers and engineers.
Well, PyID is here to fix that.
For decades, machine-learning expertise have been concentrated with companies like Google, Microsoft, Apple or even Facebook, or government organisations. They are doing an absolutely great job with these algorithms. Every time you do a Google search - that is machine learning in action. When you talk to Google Now, or Siri, that is also machine learning. Or when Facebook tags a photo you just uploaded – that is cutting-edge algorithms too.
PyID is the first attempt to provide a level of intelligence to your Raspberry Pi. It offers a well-written package of source codes so you can integrate it with your existing codes seamlessly. It works on images, so even a beginner can get it up and running within minutes.
At the heart of PyID is a data-structure which has been trained on benchmarked dataset MNIST. This data-structure is used at the execution time to validate the input image against the trained images. It outputs with high confidence, which digit the image represents. In cases where the numbers look similar, it outputs the numbers with the likelihood of what it thinks it is.
Below video shows the training step of one of my algorithms.
PyID is a standalone package. Meaning you can even run it without any extra codes. And the standard package includes a pre-trained algorithm, so all you need is to port it to the Pi!
However, for the advanced inventor, I offer the complete package. This package includes trainable codes, so with the right methods, it can be adapted to many purposes. But due to the resource limitations of the Raspberry Pi, the network cannot be trained on the Pi itself. But don’t worry! I have written the source to be executable in any platform that runs Python. So all you have to do is load it to your PC or Mac and train the network. This also means that PyID is not just restricted to Raspberry Pi. You can even run this code in Android programs where Python sources can be incorporated, so maybe next time you want to add some pattern recognition to your project, PyID is there for you!
I can't wait to see what you will come up with using PyID!
Why Python and Raspberry Pi?
Python is emerging as a strong competitor to existing scientific programming languages such as Matlab. The best thing about it? Unlike other scientific languages, it is open source, free to download and use. It is also a pleasure to code with, the syntax is much like English language, and it offers very rapid prototyping capabilities. Also, the hobbyists, tech enthusiasts and even major companies use the Raspberry Pi for their prototype development. So a Python based script running on the Pi was a natural choice!
Neural Network Visualisation
Risks and challenges
How accurate is the network?
Due to the resource limitations on the Raspberry Pi, the algorithm only achieves about 96% accuracy rate on the MNIST test dataset. This is mainly because Raspberry Pi runs out of RAM and processing power when executing a large neural network. However, to overcome this I have written the source code so that it outputs a likelihood as a percentage when the network is not confident about its recognition.
But you can make this neural network larger by changing just three variables, and can run on PC or Mac and can achieve about 98% accuracy. This is the state-of-the-art for PyID's neural network.
Depending on the web-traffic, the package download time, and availability would vary. Not to worry, I have accounted for this in the planning stage, and will guarantee that your download will be available to you.
Support this project
- (30 days)