1
00:00:00,810 --> 00:00:01,530
Lesson 10.

2
00:00:01,700 --> 00:00:02,460
Project five.

3
00:00:02,730 --> 00:00:08,550
Intelligent Media, a station with 280 for theory and data collection.

4
00:00:09,420 --> 00:00:15,930
Now for this lesson learned how to use your terminal and TensorFlow for microcontrollers to make a smart

5
00:00:15,930 --> 00:00:21,330
media station that can predict the weather and precipitation for the next 24 hours.

6
00:00:21,360 --> 00:00:29,730
Based on the data from local sensors like the Beam Me 280 in this lesson, you will learn how to apply

7
00:00:29,730 --> 00:00:36,300
model optimization techniques, which will allow you to run a medium sized convolutional neural network,

8
00:00:36,750 --> 00:00:43,860
as well as a sleek GeoEye and Wi-Fi, all at the same time for the days and months.

9
00:00:44,340 --> 00:00:45,630
Now this is the end result.

10
00:00:45,840 --> 00:00:53,100
You can see the current temperature, humidity and atmospheric pressure on the screen, as well as the

11
00:00:53,100 --> 00:00:53,760
city name.

12
00:00:54,210 --> 00:01:00,440
The predicted weather type and the predicted precipitation chance at the bottom of the screen.

13
00:01:00,900 --> 00:01:07,950
There is actually a log output field here, which you can use to show extreme weather information or

14
00:01:07,950 --> 00:01:09,510
other relevant information.

15
00:01:10,020 --> 00:01:13,800
There are a lot of things you can do to make it even better, actually.

16
00:01:14,130 --> 00:01:21,330
For example, you can put news and tweets on the screen using deep sleep mode to save energy and make

17
00:01:21,330 --> 00:01:23,290
it battery powered.

18
00:01:23,550 --> 00:01:24,450
And so on.

19
00:01:25,230 --> 00:01:32,430
It is the same thing we have done many times before, but this time the time period for weather prediction

20
00:01:32,430 --> 00:01:35,370
is a lot longer than it was in the past.

21
00:01:36,270 --> 00:01:43,620
But we measure every hour we will use 24 hours of data to make predictions about how things will go

22
00:01:44,280 --> 00:01:44,440
with.

23
00:01:44,460 --> 00:01:50,460
The same model will also predict what weather will be like for the next 24 hours.

24
00:01:51,150 --> 00:01:57,930
The Chorus Function API and the multi output model will help us with this, so we will use them.

25
00:01:58,440 --> 00:02:04,650
Now this is going to be a very interesting topic, so make sure to listen very well in a multi output

26
00:02:04,650 --> 00:02:05,070
model.

27
00:02:05,280 --> 00:02:09,330
There will be a standard which will be the same for both outputs.

28
00:02:09,810 --> 00:02:12,690
This time will branch out to two different outputs.

29
00:02:13,080 --> 00:02:19,170
The main reason to use a multi output model instead of two separate model is that the data and learned

30
00:02:19,170 --> 00:02:24,930
feature is used to predict weather type and precipitation charts are very similar.

31
00:02:25,560 --> 00:02:31,950
If you're making this project on the windows, first thing you'll need to do is to download nightly

32
00:02:31,950 --> 00:02:39,360
version of the Arduino I.D. Since current stable version, one point eighteen point three will not compile

33
00:02:39,360 --> 00:02:42,600
sketches with a lot of leverage dependencies.

34
00:02:43,080 --> 00:02:48,690
The issue is that Linka command during compilation exceeds maximum length on windows.

35
00:02:49,200 --> 00:02:56,760
Second thing is that you need to make sure you have one point eight point two version of C SGMD board

36
00:02:56,760 --> 00:03:04,020
definitions adrenal I.D. Then finally, since we're using a convolutional neural network and build it

37
00:03:04,020 --> 00:03:10,530
with chorus API, it contains an operation that supported by current stable version of TensorFlow Micro,

38
00:03:11,220 --> 00:03:14,070
resulting TensorFlow issues on GitHub.

39
00:03:14,370 --> 00:03:20,220
One found that there is a pull request for adding this up.

40
00:03:20,640 --> 00:03:28,770
Expand underscore DMC two list of available apps, but it was not merged into Master at the time of

41
00:03:28,770 --> 00:03:29,910
making this video.

42
00:03:30,870 --> 00:03:37,440
You can get lawned the TensorFlow repository, switch to PR branch and compile are doing a library by

43
00:03:37,800 --> 00:03:39,210
executing this code.

44
00:03:40,470 --> 00:03:47,550
Alternatively, you can download already compiled library from this project GitHub repository and place

45
00:03:47,550 --> 00:03:50,040
it into your Arduino Sketchiest Libraries folder.

46
00:03:50,490 --> 00:03:54,660
Just make sure you only have one TensorFlow Lite library at the time.

47
00:03:55,050 --> 00:03:59,820
Now, to kick off the practice mode, it all begins with the data off the course.

48
00:04:01,170 --> 00:04:07,740
For this tutorial, we will use a readily available weather data set from Kaggle Historical Hourly Weather

49
00:04:07,740 --> 00:04:10,800
Data of 2012 to 2017.

50
00:04:11,370 --> 00:04:19,890
The seat Edu headquarters are located in Shenzhen, which is a city in southern China, and that city

51
00:04:19,890 --> 00:04:21,660
is absent from the data set.

52
00:04:22,170 --> 00:04:29,730
So we picked a city that is located on the similar latitude and also has a subtropical climate, which

53
00:04:29,730 --> 00:04:30,660
is Miami.

54
00:04:31,170 --> 00:04:35,640
Now you'll need to pick a city that at least has a similar climate to where you live.

55
00:04:36,150 --> 00:04:41,880
If you train a model on data from Miami and then use it in Chicago in the winter.

56
00:04:42,150 --> 00:04:46,400
It won't be able to predict what will happen in the course materials.

57
00:04:46,410 --> 00:04:51,270
You can find a Jupyter notebook that you can use to process and train models.

58
00:04:51,810 --> 00:04:53,070
Let's try to open it now.

59
00:04:54,100 --> 00:04:57,790
Now, because Google Lab already has all the software you need.

60
00:04:58,210 --> 00:05:03,310
The easiest way to run this notebook is to upload it in Google CoLab.

61
00:05:03,580 --> 00:05:10,000
Alternatively, you can execute the book locally and to do that, first install all the required dependencies

62
00:05:10,000 --> 00:05:19,390
in the virtual environment by running PIP, Install Slash our requirements that tax with email virtual

63
00:05:19,390 --> 00:05:26,440
environment you have created before activated, then run Jupyter Notebook Command in the same environment,

64
00:05:26,440 --> 00:05:29,620
which will open notebook server in your default browser.

65
00:05:30,850 --> 00:05:38,470
Jupiter notebooks are a great way to explore and present data since they allow having both text and

66
00:05:38,470 --> 00:05:40,660
executable code in the same environment.

67
00:05:41,140 --> 00:05:47,830
The general workflow is somewhat explained in the notebook text sections, so make sure to experiment

68
00:05:47,830 --> 00:05:53,680
with different plan time window in the notebook to see how it affects model accuracy.
