Colour Recognition with Neural Network
To my surprise, I discovered the SoC of the Intel Curie board features a neural network, called NeuroMem, with 128 neurons and 128 bytes of memory per neuron. It has been licensed to Intel by General Vision.
Basically, neurones associate a category (output) to a set of variables (inputs). The first example that came up was colour recognition. The input variables includes the red-green-blue-clear values and the output categories list the colours to be recognised. So I gave the neurons a try and selected the I²C smartColours Smart Sensor to check how technology has evolved. Using neurones consists on two (or three) parts:
|
Hardware
Apart from the Intel Curie board, I'm using the excellent Grove I²C colour reader based on the TCS3414CS and provided by Seeed Studio, and a serial screen from 4D Systems for a better interface during the training period.
Each device requires a shield and comes with a proprietary connector, so the final result is the standard sandwich of boards and cables messing around. |
|
Software
As with the hardware, software relies on off-the-shelf libraries and includes:
The Pattern Matching Engine library corresponds to the CurieNeurons Pro Library previously sold by General Vision for USD19. Both libraries give access to all the 128 neurones. General Vision provides an excellent introduction to neural networks with the presentation Unleashing the neurons of the Intel® Curie module on the Arduino/Genuino 101 platform. |
The application consists of two main screens, one per main step.
The sensor reads the colours and the user defines one category, here one among three colours plus empty. The colours and the associated category are then committed to the neural network. |
Conclusion
This very basic project provides an excellent opportunity to explore neural networks, one of the multiple technologies used by artificial intelligence. As long as the colours are distinct, the neural network can differentiate them.
If I compare this project with the standard algorithm I used on the I²C smartColours Smart Sensor, neural networks are easier to program and faster to operate. There is no more need to develop algorithms as the neural network is self-programmed. Again, training is the key part. Poor training results in poor accuracy. Unfortunately, Intel no longer supports the Curie board. Same fate includes the Galileo and the Edison boards. Let's hope General Vision continues to offer affordable shields with more powerful neural network chips. |
Links
|
Posted: 04 Jan 2018
Updated: 27 May 2019
Updated: 27 May 2019