OK, now we proceed for a lesson to still project one.
For this, we will be discussing on recognizing gestures with light sensors.
But for now, we'll be tackling on the theory and data collection.
If you actually think about it, the working principle of this project is very simple.
The different gestures about the light sensor will block different amounts of light for different lengths
of time.
High volumes will be shown first.
Nothing above the sensor, then will show low values for the time.
Rock is above the sensor, then high values again each time a finger in paper passes above the sensor.
We will get a value that these high, low, high, low, high, low, high, low.
So in this lesson, we are going to train and deploy a simple neural network for classifying Rock-Paper-Scissors
gestures with just a single light sensor.
There is actually a high variance in speed and amplitude of values from sensor, which makes it a great
case for using machine learning model and not hand-crafted algorithm for the task.
So to prepare, we need to make sure that you have Arduino IDE installed and working at Real Terminal.
Then if that's accurate?
Create an account on each impulse website and make a new project there on this path.
You can forward any type of sensor data to each impulse platform with data for work.
Now here you can see here it is actually pseudo code for forwarding arbitrary sensor data from device.
On this illustration, on the left and on the right, then if you have multiple sensor values in one
pocket, each sensor says here values should be separated with the comma or double character.
And then at the end of the packet, it is denoted by a new line character so you can just use serial
dot, bring in for less value in a packet or send the new line characters separately, as seen above
example, serial point print, for example.
On the right side of this illustration, you could see this is actually.
Data from a three axis accelerometer.
And in this project, we just have one sensor that sends one value in each pocket.
So on this slide, we need to set sample to ten 10000 milliseconds or ten seconds and then suppose for
each gesture, such as waving the hand in the vicinity of the wheel terminal.
Then once you uploaded the go to your terminal, make sure to run edge impulse data for wider in command
prompt and log in with your edge impulse credentials.
And after that, you are ready to receive data in an impulse dashboard.
Then go to Data Acquisition tab and you should see your device there, and then you will be able to
see the data that was collected after the samples have been taken.
You need to make sure that the data is correct before you start collecting the next sample, actually.
OK, now on this slide.
This is actually a small dataset, but we also have a tiny neural network, so under fitting it's more
likely than I'll refer to.
In this particular case, underfunding means that a statistical model or a machine learning algorithm
is said to be under 15 when you can configure or figuring out the underlying trend in this data.
Now this can happen when the model size is somehow too small to come up with a general rule for data
that has a lot of variety and noise and then four feet over fitting.
This means that a statistical model is said to be over fitted when it starts to learn from the noise
and mistakes in our dataset.
This is called overfitting.
You can do this when you have a big model and a small amount of data.
The model can learn by heart all the data points without having to think about how they all relate to
each other.
So people who collect samples should make sure the model can generalize better by having a lot of different
things to look at.
Now, this could include things like samples that are moving in different directions or speeding away
from the sensor.
In general, the network only learns from the data that is in the dataset.
If the only data you have is gestures moving from left to right above the sensor, you shouldn't expect
the network to be able to recognize gestures moving from like the left or up and down when it's been
trained already for left or right and on expansion.
We need to collect more data samples in different light could.