1 00:00:00,660 --> 00:00:07,650 In the last lecture, we saw that we were not able to achieve high value addition that could I see due 2 00:00:07,650 --> 00:00:08,610 to overfitting. 3 00:00:11,110 --> 00:00:11,980 In this lecture. 4 00:00:13,010 --> 00:00:20,690 In this lecture, we will apply different image processing to avoid or what fitting, and we will also 5 00:00:20,690 --> 00:00:24,480 introduce a global player in our modern architecture. 6 00:00:26,740 --> 00:00:28,230 And inmates preprocessing. 7 00:00:28,800 --> 00:00:31,740 We will uplay shearing rotation. 8 00:00:32,850 --> 00:00:39,550 Shift, height, shift and zoom to create dummy data from orbit. 9 00:00:39,710 --> 00:00:40,550 Or is nilita? 10 00:00:42,760 --> 00:00:44,800 Now, shearing looks like this. 11 00:00:45,070 --> 00:00:49,030 So this is over what is no limit shearing means. 12 00:00:49,300 --> 00:00:52,300 We are pulling any even ed off over photo. 13 00:00:53,500 --> 00:01:01,000 And converting a script and do a rhombus rotation means rotating the image. 14 00:01:03,320 --> 00:01:08,030 Which shift means we are shifting of a whole image? 15 00:01:08,800 --> 00:01:09,660 Left or right? 16 00:01:10,670 --> 00:01:18,950 Hide shift means we are shifting of wholly made up or down and zooming means we are zooming in at any 17 00:01:18,950 --> 00:01:21,080 particular section of our image. 18 00:01:22,910 --> 00:01:29,720 Now, it is very easy to randomly apply all these features to over images. 19 00:01:32,300 --> 00:01:34,950 Again, we will be using meat doesn't litter. 20 00:01:36,500 --> 00:01:38,590 The data will flow from that ACRI. 21 00:01:38,840 --> 00:01:41,600 So we will be using flow from Derek Cremator. 22 00:01:42,500 --> 00:01:44,270 And here we are reading the data. 23 00:01:44,630 --> 00:01:46,960 We are reading the data from our train directory. 24 00:01:47,900 --> 00:01:49,160 The target size. 25 00:01:50,130 --> 00:01:52,900 Of the images we want is one 50 by one 50. 26 00:01:53,700 --> 00:01:57,840 And this time we want images in the bed size of potato. 27 00:01:58,890 --> 00:02:01,230 Earlier, we were using Betsey's of 20. 28 00:02:01,590 --> 00:02:03,520 Now we are using Betsey's of today. 29 00:02:06,450 --> 00:02:08,580 And the last more is binary. 30 00:02:09,000 --> 00:02:16,610 Since we have two classes and the images of these glasses are in separate folders in our working directory. 31 00:02:19,630 --> 00:02:28,260 Now, this is the code to convert over inmate data into handsets now using inmates due to and later 32 00:02:28,420 --> 00:02:30,580 we can apply preprocessing here. 33 00:02:31,240 --> 00:02:39,700 So earlier we were only using rescaling to rescale RGV values from zero to 255 to zero to one. 34 00:02:40,840 --> 00:02:44,780 No, we can use a patient range parameter. 35 00:02:45,520 --> 00:02:48,820 This the parameter to give rotation ranges. 36 00:02:49,690 --> 00:02:54,880 So here my inmates can rotate from minus 40 to 40 degree. 37 00:02:55,870 --> 00:02:57,040 For each inmate. 38 00:02:58,160 --> 00:03:04,370 That inmates detergent network will automatically randomly choose a value between minus 40 to 40 and 39 00:03:04,460 --> 00:03:07,430 applied that probation to the audience limit. 40 00:03:08,690 --> 00:03:12,980 Similarly, we are using overt word shift Grange of point to. 41 00:03:14,950 --> 00:03:22,900 Point two means we are allowing inmates due to the need to shift our images left or right. 42 00:03:23,830 --> 00:03:26,190 By 20 percent of the total work. 43 00:03:27,850 --> 00:03:31,990 Similarly, we are using hyd shift grainge of zero point two percent. 44 00:03:32,710 --> 00:03:36,610 This means 20 percent of total height. 45 00:03:36,760 --> 00:03:39,190 We are allowing inmates who died in return to shift. 46 00:03:41,810 --> 00:03:45,740 Now, note that these sultriness, we are not seeing that. 47 00:03:46,680 --> 00:03:50,050 Applied 20 percent of high tariffs to agreement. 48 00:03:50,790 --> 00:03:53,190 We are just mentioning the upper limit. 49 00:03:54,240 --> 00:04:00,060 So he data generator will randomly choose a number between zero and zero point to. 50 00:04:01,160 --> 00:04:05,610 And applied that which shift or hardship to over or regional limits. 51 00:04:06,200 --> 00:04:15,500 Similarly, we are using those sheer range of zero point to a zoom range of zero point two and horizontal 52 00:04:15,500 --> 00:04:16,940 flip equate to crew. 53 00:04:18,110 --> 00:04:23,990 Horizontal flip just means the mirror image along the vertical axis. 54 00:04:26,580 --> 00:04:34,320 So right now, if this is our original image, the camera is pointing towards right horizontal flip 55 00:04:34,320 --> 00:04:34,800 means. 56 00:04:36,080 --> 00:04:38,930 The mirror image of this image along this axis. 57 00:04:38,960 --> 00:04:41,780 So the camera in point to the left. 58 00:04:44,570 --> 00:04:47,150 So the code is very similar to last thing. 59 00:04:48,850 --> 00:04:52,560 We are creating green underscore doesn't object. 60 00:04:53,780 --> 00:04:56,430 And which we are mentioning all this parameters. 61 00:04:57,430 --> 00:05:03,350 And in this train underscored details in the details flowing from Betty Currie. 62 00:05:03,730 --> 00:05:09,130 And here we are mentioning the train directory, train size, bed size and plus more. 63 00:05:12,410 --> 00:05:16,800 Now we will be dreaming of a model only on the creating data dataset. 64 00:05:18,000 --> 00:05:23,540 So there is no need to uplay all this transformation on the validation side. 65 00:05:26,430 --> 00:05:32,550 Therefore, when we are creating pest detection, we are just rescaling our data. 66 00:05:32,730 --> 00:05:36,180 We are not applying all this transformations to our data. 67 00:05:40,650 --> 00:05:46,920 So if we execute this code, we will be creating who doesn't let us first to the train. 68 00:05:46,950 --> 00:05:48,010 And that's code generator. 69 00:05:48,180 --> 00:05:51,880 And second is the validation underscored in data and validation. 70 00:05:51,930 --> 00:05:53,360 We are using test detection. 71 00:05:53,480 --> 00:05:56,880 We are we are not applying any of these transformations. 72 00:05:59,140 --> 00:06:05,500 So this are the sample of images that will be generated by our train doesn't return. 73 00:06:07,000 --> 00:06:12,850 So here you can see that all these three images are from a single original image. 74 00:06:14,350 --> 00:06:17,410 So you can see that that is a horizontal flip here. 75 00:06:18,710 --> 00:06:20,130 Between these two images. 76 00:06:20,390 --> 00:06:26,530 So in the first image, the cat is pointing towards left in the second limit. 77 00:06:26,990 --> 00:06:28,630 The cat is pointing towards right. 78 00:06:29,750 --> 00:06:35,330 There is some work shift as well, and this two images in the tournament. 79 00:06:35,360 --> 00:06:40,070 You can see that there is some percentage of sheer applied to the image. 80 00:06:41,920 --> 00:06:44,630 And some zoom is also there.