Embedded Computing
  • About
  • Blog
  • Hardware
    • Which Platform?
    • Controller Platforms >
      • Adafruit Platform
      • Arduino Plaform
      • BBC micro:bit
      • Espressif Platform
      • iLabs Platform
      • Raspberry Pi Platform (MCU)
      • Seeed Platform
      • Silicon Labs Platform
      • Teensy Plaform
    • Computer Platforms >
      • BeagleBone Platform
      • Raspberry Pi Platform (SBC)
      • UDOO Platform
    • Peripherals >
      • Shields
      • Grove System
      • Sensors
      • Actuators
    • Displays >
      • E-Paper Displays
      • Reflective Displays
      • TFT Displays
      • LCD Displays
    • Legacy Platforms >
      • chipKIT Plaform
      • 4D Systems Platform
      • Intel Platform
      • LaunchPad Plaform
      • BoosterPacks for LaunchPads
      • LightBlue Bean
      • Maple Plaform
      • Mediatek Platform
      • Microsoft Azure IoT DevKit
      • Particle Platform
  • Software
    • Exploring RTOS with Galaxia >
      • Event Library
      • Semaphore Library
      • Mailbox Library
      • Timer Library
      • Clock Library
      • SWI Library
      • Task Library
    • Ultra-Low Power with EnergyTrace >
      • Ultra-Low Power with MSP430
      • Ultra-Low Power with Energia MT and Galaxia
    • Using Integers Instead of Reals
    • Going Python?
  • IoT
    • IoT Platforms: Which Hardware? >
      • Matter with Silicon Labs MG24
    • IoT Services: Which Solution? >
      • Recommended IoT Solutions
      • Platform-Specific IoT Solutions
      • Other IoT Solutions
      • Not tested IoT Solutions
      • Notification Solutions
    • Get Date and Time from Internet with NTP
    • Fast and Easy WiFi Connection with QR-Code
  • Tools
    • How to Start?
    • Reference >
      • Asking for Help
      • Boards Pins Maps
      • Ruler
      • Boards and Plugs
      • I²C Logic Level Converter
      • Standards for Connectors
    • Training >
      • Texas Instruments Workshops
      • Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x
      • Embedded Systems - Shape The World: Microcontroller Input/Output — MOOC edX UTAustinX UT.6.10x
      • Embedded Systems - Shape The World: Multi-Threaded Interfacing — MOOC edX UTAustinX UT.6.20x
      • Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x
      • Systems Thinking with Texas Instruments Robotics System Learning Kit
    • Books >
      • Getting Started with the MSP430 LaunchPad
      • Getting Started with Arduino
      • Arduino Cookbook
    • IDE >
      • The Battle of IDEs
      • More Options
      • Assessing the Next Generation of IDEs
      • Tools for Documentation
    • Equipment >
      • Saleae Logic Analyser
      • Rigol DS1102E Oscilloscope
      • XDS110 Debug Probe with EnergyTrace​
      • Segger J-Link Programmer-Debugger
      • Nordic Power Profiler Kit II
  • Projects
    • Libraries >
      • Master I²C Software Library
      • Date and Time Library
      • highView Library Suite
      • Others Libraries
    • smartDevices >
      • I²C smartColours Smart Sensor
      • I²C smartRFID Smart Sensor
      • I²C smartLED Display
      • I²C smartControls Smart Device
      • I²C smartWiFi Smart Device
      • I²C smartBLE Smart Device
      • I²C smartNode Smart Device
    • IoT Projects >
      • Remote E-Paper Weather and Message Board
      • Typie-Walkie with LoRa and E-Paper Screen
      • Typie-Walkie with E-Paper Screen
      • Remote e-Paper Pictures Panel
      • Remote e-Paper Messages Panel
      • Industrial IoT Project
      • Remote Contactless Temperature Monitor
      • Using Node-RED for IIoT
      • Low Power Home Network Weather Monitoring
      • Updated Low Power Home Network Weather Monitoring
      • Weather and Security Station with Blynk
      • SensorTag to Blynk Using Node-RED
      • Pervasive Reporting
    • AI Projects >
      • Colour Recognition with Neural Network
    • Other Projects >
      • Air Quality Monitoring
      • Driving a Large E-Paper Display with a Compact Xiao RP2040
      • Low-Power E-Paper Weather Station
      • Portable Particulate​ Matter Monitor
      • FRAM-based E-Paper Screen Controller
      • General Purpose 3.5" Screen
      • Colour Recognition with Neural Network
      • A Low Power Weather Station
      • Digital Volt-Amp-Watt Meter
      • Mobile Measurement with LCD Display
      • Screen with SRAM for GUI
      • Volt-Amp-Watt-Meter for Grove
      • Multi-Touch Project with CapTIvate

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:
  • Training neurones is performed by providing the neurones with sets of values and category. Training is the key part. Poor training results in poor accuracy.
  • Optionally, testing neurones checks the neural network works fine. This is carried out by providing sets of values and comparing the answer with the expected category. The sets for testing could be the same used previously for training, or different ones.
  • Using neurones consists on providing the set of input variables to obtain the category as an answer. 
Picture

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 Seeed Studio library for Grove Colour Sensor,
  • the Diablo16 Serial Arduino Library for 4D Systems screen, and
  • the Pattern Matching Engine library for the neural network of the Intel Curie board. 
​
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.

Picture
The application consists of two main screens, one per main step.

  • The first screen corresponds to the learning process.
​
​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.
Picture
  • The second screen uses the neural network to guess or recognise the colours.
​
​As for the first step, the sensor reads the colours and the neural network guesses or recognises the colour.
Picture
Apart from the interface on the touch-screen, the whole process is traced to the serial port: first configure, then learn, finally guess.
Picture

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.
Picture

Links

  • Arduino 101 
  • Intel Curie
  • General Vision CurieNeurons page and library  
  • ​Pattern Matching Engine library for Curie
  • ​API Reference for the Intel Pattern Matching Technology Library
  • I²C smartColours Smart Sensor
Picture
Picture
Posted: 04 Jan 2018
​Updated: 27 May 2019

Powered by Create your own unique website with customizable templates.