1
00:00:00,670 --> 00:00:04,360
OK, now we proceed for a lesson to still project one.

2
00:00:04,840 --> 00:00:09,940
For this, we will be discussing on recognizing gestures with light sensors.

3
00:00:10,120 --> 00:00:14,620
But for now, we'll be tackling on the theory and data collection.

4
00:00:15,910 --> 00:00:21,580
If you actually think about it, the working principle of this project is very simple.

5
00:00:22,330 --> 00:00:27,370
The different gestures about the light sensor will block different amounts of light for different lengths

6
00:00:27,370 --> 00:00:27,880
of time.

7
00:00:29,140 --> 00:00:30,940
High volumes will be shown first.

8
00:00:31,780 --> 00:00:36,650
Nothing above the sensor, then will show low values for the time.

9
00:00:36,670 --> 00:00:44,710
Rock is above the sensor, then high values again each time a finger in paper passes above the sensor.

10
00:00:45,520 --> 00:00:50,140
We will get a value that these high, low, high, low, high, low, high, low.

11
00:00:51,160 --> 00:00:57,940
So in this lesson, we are going to train and deploy a simple neural network for classifying Rock-Paper-Scissors

12
00:00:57,940 --> 00:01:00,700
gestures with just a single light sensor.

13
00:01:01,570 --> 00:01:08,170
There is actually a high variance in speed and amplitude of values from sensor, which makes it a great

14
00:01:08,170 --> 00:01:13,870
case for using machine learning model and not hand-crafted algorithm for the task.

15
00:01:14,920 --> 00:01:21,580
So to prepare, we need to make sure that you have Arduino IDE installed and working at Real Terminal.

16
00:01:22,300 --> 00:01:23,590
Then if that's accurate?

17
00:01:23,770 --> 00:01:29,470
Create an account on each impulse website and make a new project there on this path.

18
00:01:29,980 --> 00:01:35,380
You can forward any type of sensor data to each impulse platform with data for work.

19
00:01:35,950 --> 00:01:42,940
Now here you can see here it is actually pseudo code for forwarding arbitrary sensor data from device.

20
00:01:43,930 --> 00:01:50,140
On this illustration, on the left and on the right, then if you have multiple sensor values in one

21
00:01:50,140 --> 00:01:56,740
pocket, each sensor says here values should be separated with the comma or double character.

22
00:01:56,800 --> 00:02:05,110
And then at the end of the packet, it is denoted by a new line character so you can just use serial

23
00:02:05,650 --> 00:02:12,760
dot, bring in for less value in a packet or send the new line characters separately, as seen above

24
00:02:12,970 --> 00:02:16,810
example, serial point print, for example.

25
00:02:17,500 --> 00:02:23,170
On the right side of this illustration, you could see this is actually.

26
00:02:24,340 --> 00:02:28,130
Data from a three axis accelerometer.

27
00:02:28,900 --> 00:02:35,020
And in this project, we just have one sensor that sends one value in each pocket.

28
00:02:35,620 --> 00:02:46,570
So on this slide, we need to set sample to ten 10000 milliseconds or ten seconds and then suppose for

29
00:02:46,570 --> 00:02:51,220
each gesture, such as waving the hand in the vicinity of the wheel terminal.

30
00:02:52,000 --> 00:02:59,860
Then once you uploaded the go to your terminal, make sure to run edge impulse data for wider in command

31
00:02:59,860 --> 00:03:02,830
prompt and log in with your edge impulse credentials.

32
00:03:03,160 --> 00:03:07,120
And after that, you are ready to receive data in an impulse dashboard.

33
00:03:07,630 --> 00:03:13,570
Then go to Data Acquisition tab and you should see your device there, and then you will be able to

34
00:03:13,570 --> 00:03:17,470
see the data that was collected after the samples have been taken.

35
00:03:18,760 --> 00:03:23,150
You need to make sure that the data is correct before you start collecting the next sample, actually.

36
00:03:24,040 --> 00:03:25,720
OK, now on this slide.

37
00:03:26,380 --> 00:03:32,560
This is actually a small dataset, but we also have a tiny neural network, so under fitting it's more

38
00:03:32,560 --> 00:03:33,820
likely than I'll refer to.

39
00:03:33,820 --> 00:03:42,490
In this particular case, underfunding means that a statistical model or a machine learning algorithm

40
00:03:42,490 --> 00:03:48,880
is said to be under 15 when you can configure or figuring out the underlying trend in this data.

41
00:03:49,150 --> 00:03:56,560
Now this can happen when the model size is somehow too small to come up with a general rule for data

42
00:03:56,560 --> 00:04:01,660
that has a lot of variety and noise and then four feet over fitting.

43
00:04:02,650 --> 00:04:10,060
This means that a statistical model is said to be over fitted when it starts to learn from the noise

44
00:04:10,060 --> 00:04:11,410
and mistakes in our dataset.

45
00:04:11,980 --> 00:04:13,730
This is called overfitting.

46
00:04:14,470 --> 00:04:19,570
You can do this when you have a big model and a small amount of data.

47
00:04:20,140 --> 00:04:26,830
The model can learn by heart all the data points without having to think about how they all relate to

48
00:04:26,830 --> 00:04:27,340
each other.

49
00:04:28,000 --> 00:04:34,690
So people who collect samples should make sure the model can generalize better by having a lot of different

50
00:04:34,690 --> 00:04:35,590
things to look at.

51
00:04:36,160 --> 00:04:41,710
Now, this could include things like samples that are moving in different directions or speeding away

52
00:04:41,710 --> 00:04:42,490
from the sensor.

53
00:04:43,090 --> 00:04:48,970
In general, the network only learns from the data that is in the dataset.

54
00:04:49,690 --> 00:04:56,320
If the only data you have is gestures moving from left to right above the sensor, you shouldn't expect

55
00:04:56,320 --> 00:05:02,620
the network to be able to recognize gestures moving from like the left or up and down when it's been

56
00:05:02,620 --> 00:05:07,470
trained already for left or right and on expansion.

57
00:05:08,230 --> 00:05:11,170
We need to collect more data samples in different light could.
