1
00:00:00,110 --> 00:00:04,040
Hello everyone and welcome to this new and exciting session.

2
00:00:04,460 --> 00:00:10,760
According to the World Health Organization, nearly half of the world's population is at risk of malaria.

3
00:00:10,760 --> 00:00:18,350
In 2022, an estimated 249 million people contracted malaria in 85 countries.

4
00:00:18,350 --> 00:00:24,470
That same year, the disease claimed approximately 608,000 lives across the world.

5
00:00:24,710 --> 00:00:32,030
Malaria is an acute febrile illness caused by the Plasmodium parasites, which are spread to people

6
00:00:32,030 --> 00:00:35,810
through the bite of an infected female Anopheles mosquito.

7
00:00:36,020 --> 00:00:39,080
Now this disease is preventable and curable.

8
00:00:39,080 --> 00:00:49,010
In this section, we shall see how we could build out a model which takes in as input this blood cell

9
00:00:49,010 --> 00:00:57,560
and says whether this blood cell is infected by the malaria parasite or not.

10
00:00:57,770 --> 00:01:04,910
With that said, the data, we shall be using to train our model will be composed of input images like

11
00:01:04,910 --> 00:01:12,320
this one, and the output which is parasitic or uninfected.

12
00:01:12,320 --> 00:01:16,790
So we could have parasitic and then we could also have uninfected.

13
00:01:16,790 --> 00:01:21,230
So we have these two outputs or these two possible outputs.

14
00:01:21,230 --> 00:01:25,250
In this section we shall start by understanding the task.

15
00:01:25,250 --> 00:01:27,920
Then we'll dive into preparing the data.

16
00:01:27,920 --> 00:01:32,240
Then we'll build a model, in this case a new model.

17
00:01:32,240 --> 00:01:34,250
That's a convolutional neural network.

18
00:01:34,250 --> 00:01:40,250
We shall check out on another error sanctioning method.

19
00:01:40,250 --> 00:01:47,570
Then we'll go ahead and train our model, evaluate this model, then apply necessary corrective measures

20
00:01:47,570 --> 00:01:55,910
to ensure that we have an even more performant model to understand the task, we shall get back to how

21
00:01:55,910 --> 00:01:58,430
the blood cells are being generated.

22
00:01:58,430 --> 00:02:05,930
Given that these blood cells make up the dataset which we shall use in training our model.

23
00:02:05,930 --> 00:02:11,300
So as you could see here, the first thing is we select the finger to be punctured.

24
00:02:11,300 --> 00:02:14,240
Then we puncture the ball of the finger.

25
00:02:14,240 --> 00:02:19,790
And lastly we touch the next drop of blood with a clean slide.

26
00:02:19,790 --> 00:02:27,020
With the blood now placed on the clean slide, we could view this under a microscope where you could

27
00:02:27,020 --> 00:02:31,190
see here we have Thin Blood film and then we have the Thick Blood film.

28
00:02:31,520 --> 00:02:36,830
Um, what's important to note here is the fact that we could extract each and every one of the cells

29
00:02:36,830 --> 00:02:37,070
here.

30
00:02:37,070 --> 00:02:43,700
So if you could pick out just the cell, and then you have this image which you have right here, and

31
00:02:43,700 --> 00:02:50,570
then, um, is this image with its corresponding label, which is that of parasitic or uninfected that

32
00:02:50,570 --> 00:02:53,240
will use to train our model.

33
00:02:53,240 --> 00:02:55,640
Now just focusing on our input.

34
00:02:55,640 --> 00:02:56,720
That's the image.

35
00:02:56,720 --> 00:02:59,210
You would find that if you zoom in.

36
00:02:59,510 --> 00:03:00,800
Let's get in here.

37
00:03:00,800 --> 00:03:10,130
If you zoom in we have um, this units here beyond which we cannot, um, zoom in any further.

38
00:03:10,130 --> 00:03:11,930
So let me reduce this.

39
00:03:13,220 --> 00:03:17,210
Let's draw around the outlines of these little squares.

40
00:03:17,210 --> 00:03:20,270
So let's take this, um, specific square here.

41
00:03:20,270 --> 00:03:21,410
Let's draw this.

42
00:03:21,410 --> 00:03:23,780
And uh, there we go.

43
00:03:23,780 --> 00:03:27,800
So you'll notice that we have all these little squares right here.

44
00:03:27,800 --> 00:03:32,510
And these little squares actually represent a pixel.

45
00:03:32,510 --> 00:03:34,610
So let's let's just have this.

46
00:03:34,610 --> 00:03:37,250
So this here is a pixel.

47
00:03:37,250 --> 00:03:44,000
And all these different pixels are what make up our complete image.

48
00:03:44,000 --> 00:03:50,300
If you try to zoom out now you see you see that pixel that um unit which we could not, um, zoom in

49
00:03:50,300 --> 00:03:52,790
uh, or from which you could not zoom in any further.

50
00:03:52,790 --> 00:03:57,440
You see that when we try to zoom out, you see, it becomes, um, much smaller.

51
00:03:57,440 --> 00:04:04,880
So what we're saying is, um, this, uh, each and every, uh, small square or small pixel, um,

52
00:04:05,030 --> 00:04:13,070
forms part of our complete image and understanding, um, that, uh, pixel forms part of this complete

53
00:04:13,070 --> 00:04:13,460
image.

54
00:04:13,460 --> 00:04:19,430
And the kinds of values it takes in is important, um, when building machine learning systems.

55
00:04:20,550 --> 00:04:33,060
That said, when we see, um, an image like this one is 490 by 760, um, 766 pixel image.

56
00:04:33,060 --> 00:04:44,430
What we mean is that we have 490 images, um, or rather 490 um, pixels horizontally, like if you

57
00:04:44,430 --> 00:04:47,760
go if you scroll right here, you, uh, take note.

58
00:04:47,760 --> 00:04:51,570
Let's, let's make sure you take note of what, um, every value we have here.

59
00:04:51,570 --> 00:04:54,360
So at this point here you would have the values.

60
00:04:54,360 --> 00:04:58,950
So getting back to the image you see around here we have 400.

61
00:04:58,950 --> 00:05:03,990
If I get to the the last I have 490.

62
00:05:03,990 --> 00:05:05,940
Well I'm seeing 489.

63
00:05:05,940 --> 00:05:08,190
So I have 489 by six.

64
00:05:08,190 --> 00:05:09,270
Let me go.

65
00:05:09,270 --> 00:05:10,410
Um slightly up.

66
00:05:10,980 --> 00:05:11,910
Um, okay.

67
00:05:11,910 --> 00:05:16,290
So you see I have 480, 489.

68
00:05:16,290 --> 00:05:19,050
Well, 88 488 by one.

69
00:05:19,050 --> 00:05:24,090
So what this tells us is, um, if we reduce you see, the value is reducing.

70
00:05:24,090 --> 00:05:26,670
Now we have 283 by zero.

71
00:05:26,670 --> 00:05:32,670
As we increase see, we get we go right up to 400 and um, 90.

72
00:05:32,670 --> 00:05:33,600
Let's get here.

73
00:05:33,600 --> 00:05:37,140
We have well 487 but that's actually 490.

74
00:05:37,140 --> 00:05:42,660
So this tells us that horizontally we have 490 pixels.

75
00:05:42,660 --> 00:05:45,990
And vertically we have 476 pixels.

76
00:05:45,990 --> 00:05:51,840
Now if we scroll right down here right up to this, you see we have zero now by 473.

77
00:05:51,840 --> 00:05:56,550
Well if you go get right below we should get 476.

78
00:05:56,550 --> 00:05:57,330
So that's it.

79
00:05:57,330 --> 00:06:00,270
So this tells us that we have those, um pixels.

80
00:06:00,270 --> 00:06:02,700
Now if we zoom in you zoom in.

81
00:06:02,700 --> 00:06:07,980
You have, um, similar scenario to what we had on, uh, the previous board.

82
00:06:08,010 --> 00:06:12,060
See, we have this small cells, uh, which we had seen already here.

83
00:06:12,060 --> 00:06:19,290
So we had picked out this particular cell, um, this particular cell here, which represented, um,

84
00:06:19,290 --> 00:06:20,250
a pixel.

85
00:06:21,490 --> 00:06:30,400
An image like this one, which contains 490 by 476 pixels, will contain totally

86
00:06:30,400 --> 00:06:36,040
233,240

87
00:06:36,040 --> 00:06:36,790
pixels.

88
00:06:36,790 --> 00:06:41,200
So this are the total number of pixels we have, um, in this image.

89
00:06:41,200 --> 00:06:46,900
And then for each and every pixel we have, um, it takes um three values.

90
00:06:46,900 --> 00:06:54,040
So when we have an RGB image like this one or a colored image, we have um, that for let's say this

91
00:06:54,040 --> 00:06:55,480
pixel this.

92
00:06:55,480 --> 00:07:03,340
Well let's get back for let's say a pixel, this pixel it has or it takes in three values the r value,

93
00:07:03,370 --> 00:07:07,810
the g value, and then the B value.

94
00:07:07,810 --> 00:07:15,850
And then each and every one of these values range between 0 and 255.

95
00:07:15,850 --> 00:07:19,630
So um the r will range between 0 to 55.

96
00:07:19,630 --> 00:07:24,670
The g between 0 to 55 and then the B between 0 and 255.

97
00:07:24,670 --> 00:07:31,960
Making use of this image gotten from the Matlab website, you find that um, our image is made of the

98
00:07:31,960 --> 00:07:37,510
r c, the g that's the green and then the blue.

99
00:07:37,510 --> 00:07:40,630
So um, and then the blue component.

100
00:07:40,630 --> 00:07:48,760
So if you pick out a pixel like um let's say we pick out this pixel, um, you have its R value, you

101
00:07:48,760 --> 00:07:51,310
have its g value.

102
00:07:51,340 --> 00:07:53,650
You have its blue value.

103
00:07:53,650 --> 00:07:57,280
Now you may be wondering why all those values actually range between 0 and 1.

104
00:07:57,280 --> 00:08:04,660
The simple answer is that if we have values ranging between zero and then 255, um, for them to range

105
00:08:04,660 --> 00:08:06,760
between 0 and 1, we could normalize them.

106
00:08:06,760 --> 00:08:12,940
And that's by simply dividing all the values that if we take all those values that we have and we divide

107
00:08:12,940 --> 00:08:18,550
by one, then um, or rather we divide by 255, not one.

108
00:08:18,550 --> 00:08:25,390
If we divide by 255, then all our values now will range between 0 and 1.

109
00:08:26,440 --> 00:08:34,060
And so with that said, now we could split this our image up into, um, this three different channels.

110
00:08:34,150 --> 00:08:37,120
We'll call this, um, our, our channel.

111
00:08:37,120 --> 00:08:40,780
And then we will have the G channel.

112
00:08:40,780 --> 00:08:47,530
And then we'll also have well let's paste that out and then we'll also have the B channel.

113
00:08:48,270 --> 00:08:58,950
And so this image, which is 700 or rather 476 by 490, is actually 476.

114
00:08:58,950 --> 00:09:10,230
That's 476 by 490 by three, because we have this three channels R, G and B.

115
00:09:11,800 --> 00:09:20,410
In the case where we have a black and white image that's, um, a grayscale image with only one channel,

116
00:09:20,410 --> 00:09:22,990
then we will not have this last channel.

117
00:09:22,990 --> 00:09:28,570
We just have, um, 476 by 490 or 476 by 490 by one.

118
00:09:28,570 --> 00:09:33,430
In that case, we only have, um, one of these channels right here.

119
00:09:34,720 --> 00:09:46,210
The RGB value for an image which is completely white, like this one is actually 255 by 255 by 255,

120
00:09:46,210 --> 00:09:54,730
meaning that the R value is 255, the g value is 255, and then the B value is 255.

121
00:09:54,730 --> 00:10:01,120
And then for an image which is completely black, um, the r value is zero.

122
00:10:01,150 --> 00:10:05,500
The g value is zero, and then the b value is zero.

123
00:10:05,530 --> 00:10:12,580
With that said, we could go ahead now and prepare our data, which is composed of this cell images

124
00:10:12,580 --> 00:10:14,290
and the corresponding labels.
