Introdution
This is the official project page of the AIfES developers. You want to know what exciting things you can do with AIfES? We will give you some examples through this account.
In this example we show how the Arduino Nano 33 BLE Sense using AIfES can learn the colors of three objects to classify them later. We use the colorimeter and proximity sensor of the Arduino Nano 33 BLE Sense to detect the RGB data of an object. The example was inspired by this Arduino project.
The AIfES implementation does not require a PC. The data recording, the creation of the artificial neural network, the training and the classification are done directly on the Arduino Nano 33 BLE Sense. Everything happens fully automatically.
This example is already integrated in the AIfES for Arduino library.
For more information about AIfES, visit www.aifes.ai.
How to start
For this example, you need two libraries which you can download from the Arduino library manager:
- AIfES (aifes, the second letter is a capital "i")
- Arduino_APDS9960
How to install a library is explained here.
The example shown here is already integrated in the AIfES for Arduino library. So you only need to open the example sketch. This is how you can find the example in your Arduino IDE:
File -> Examples -> AIfES for Arduino -> 1_Nano_BLE_Sense -> 0_Color_detection
As you can see in the video we use different colors on the screen to train the system. We did this to make it easier for you to see the output. You can of course use any object. Black and white objects don't work so well.
With this example you can train three different objects. Of course, you can also change the number of objects if you change the code.
Artificial neural network
The artificial neural network is a fully connected feedforward neural network with the following structure:
Activation functions:
- Hidden Layer:\tsigmoid
- Output Layer:\tsoftmax
The weights are randomly generated in a value range from -2 to 2.
The ADAM optimizer is used for training, with full batch over 300 epochs.
Training data:
Five samples per color are taken.
Video
Here the video where you can see AIfES in action:
Images
Here are the colors from the video:
EXPANDED TECHNICAL DETAILS
Edge-AI Machine Learning Hub
This cutting-edge project uses the AIfES (Artificial Intelligence for Embedded Systems) library to perform real-time color classification directly on the Arduino.
- Neural Network Inference: A small artificial neural network is trained on-device to recognize specific colors captured by a TCS3200 color sensor. The Arduino performs the "Thinking" without any cloud or PC assistance.
- Real-Time Labeling: Once a color is detected, the Arduino outputs the result (e.g., "RED identified with 95% confidence") to a Serial terminal or an I2C LCD, demonstrating the power of tinyML.
Efficiency
- Optimized Weights: The AIfES core is specifically written for 8-bit microcontrollers, ensuring high-speed inference even on a standard Arduino Uno or Nano.