1 00:00:10,320 --> 00:00:14,549 Welcome back to backspace Academy. In this lecture we're going to be running 2 00:00:14,549 --> 00:00:21,320 through some of the analytics and machine learning services on AWS Amazon 3 00:00:21,320 --> 00:00:28,800 Elastic MapReduce or EMR for short is AWS's Hadoop framework as a service 4 00:00:28,800 --> 00:00:33,780 you can also run other frameworks in Amazon EMR that integrate 5 00:00:33,780 --> 00:00:40,470 with Hadoop such as Apache spark HBase Presto and Flink. Data can be analyzed by 6 00:00:40,470 --> 00:00:49,129 EMR in a number of AWS data stores including Amazon s3 and Amazon DynamoDB 7 00:00:49,129 --> 00:00:56,670 Amazon Athena allows you to analyze data stored in an Amazon s3 bucket using 8 00:00:56,670 --> 00:01:03,629 standard SQL statement. Amazon Elastic search is a fully managed service for 9 00:01:03,629 --> 00:01:09,780 elastic.co's elasticsearch framework this allows high-speed querying 10 00:01:09,780 --> 00:01:17,280 and analysis of data that is stored on AWS. Amazon Kinesis allows you to collect 11 00:01:17,280 --> 00:01:25,920 process and analyze real-time streaming data. Amazon quicksight is a business 12 00:01:25,920 --> 00:01:30,840 intelligence reporting tool similar to tableau or if you're a Java programmer 13 00:01:30,840 --> 00:01:36,590 similar to BIRT and is fully managed by AWS 14 00:01:41,270 --> 00:01:47,420 so let's have a look at some of the machine learning services on AWS 15 00:01:47,420 --> 00:01:52,670 AWS deeplens is a deep learning enabled video camera, it has a deep learning 16 00:01:52,670 --> 00:01:57,140 software development kit that allows you to create advanced vision system applications 17 00:01:57,140 --> 00:02:04,340 Amazon Sage Maker is AWS's flagship machine learning product 18 00:02:04,340 --> 00:02:09,560 it allows you to build and train your own machine learning models and then deploy 19 00:02:09,560 --> 00:02:17,269 them to the AWS cloud and use them as a back-end for your applications 20 00:02:17,269 --> 00:02:25,340 Amazon Rekognition provides deep learning based analysis of video and images Amazon Lex 21 00:02:25,340 --> 00:02:30,260 allows you to build conversational chatbots, these can be used in many 22 00:02:30,260 --> 00:02:36,980 applications such as first-line support for customers. Amazon Polly provides 23 00:02:36,980 --> 00:02:44,510 natural sounding text-to-speech Amazon comprehend can use deeper learning to 24 00:02:44,510 --> 00:02:49,220 analyze text for insights and relationships this can be used for 25 00:02:49,220 --> 00:02:55,400 customer analysis or for advanced searching of documents. Amazon Translate 26 00:02:55,400 --> 00:03:00,829 can use machine learning to accurately translate text to a number of different languages 27 00:03:00,829 --> 00:03:07,400 Amazon Transcribe is an automatic speech recognition service 28 00:03:07,400 --> 00:03:13,269 that can analyze audio files that are stored in Amazon s3 and then return that 29 00:03:13,269 --> 00:03:19,940 transcribed the text, ok so let's have a look at using one of these machine 30 00:03:19,940 --> 00:03:27,100 learning services Amazon recognition for analyzing some image and video 31 00:03:28,330 --> 00:03:35,290 machine learning on AWS is one of the coolest things you can do on AWS and 32 00:03:35,290 --> 00:03:41,480 Amazon recognition is a service that just absolutely blows my mind away the 33 00:03:41,480 --> 00:03:47,180 reason I say that is that 30 years ago I used to be a young engineer and I was 34 00:03:47,180 --> 00:03:51,530 working in the industrial robotics industry and back then we had a vision 35 00:03:51,530 --> 00:03:56,690 system that could recognize from a black-and-white image the difference the 36 00:03:56,690 --> 00:04:03,560 difference between a triangle and a square and back then that was really 37 00:04:03,560 --> 00:04:08,450 groundbreaking stuff and I look now over the last 30 years and where we are now 38 00:04:08,450 --> 00:04:14,330 compared to where we were back then which is just unbelievable and the 39 00:04:14,330 --> 00:04:20,229 potential for this stuff is absolutely beyond belief 40 00:04:20,229 --> 00:04:26,570 ok let's get into it, its services and then to Amazon Rekognition it's R for 41 00:04:26,570 --> 00:04:30,970 just plain old Rekognition without the Amazon, so we scroll down to Rekognition 42 00:04:30,970 --> 00:04:37,729 that'll take us into the Rekognition management console and we'll try a demo 43 00:04:37,729 --> 00:04:43,130 so this will take us into a lot of different demonstrations of the power of 44 00:04:43,130 --> 00:04:47,600 this Amazon Rekognition so here we can see we've got a sample image of a guy on 45 00:04:47,600 --> 00:04:53,630 a skateboard doing a flip and amazon recognition has analyzed this object in 46 00:04:53,630 --> 00:04:58,100 this scene in this in this picture and it's identified that there's a 99.2% 47 00:04:58,100 --> 00:05:04,310 probability that there's a skateboard there and as the persons a human being 48 00:05:04,310 --> 00:05:11,780 is playing a sport we can see a lot more here he's in a parking lot maybe not 49 00:05:11,780 --> 00:05:17,960 even a row but close enough there's cars there he's on a road there's buildings 50 00:05:17,960 --> 00:05:22,660 so you can see there's a lot of stuff that has been picked up in their image 51 00:05:22,660 --> 00:05:28,130 so how does it get this so if we want to use this ourselves we need to send a 52 00:05:28,130 --> 00:05:34,700 request to the Amazon Rekognition API or we can do that through the one of the 53 00:05:34,700 --> 00:05:39,860 many software development kits that are offered by AWS so if we had for example 54 00:05:39,860 --> 00:05:43,849 the Javascript SDK we would have a function there that 55 00:05:43,849 --> 00:05:47,630 we could send this request off to. So what does a request look like? so we can 56 00:05:47,630 --> 00:05:51,860 see here we're going to have our object that's in a bucket we're going to 57 00:05:51,860 --> 00:05:58,009 provide the bucket name and we're also going to provide the name of the object 58 00:05:58,009 --> 00:06:04,729 that is our image when we send that off to AWS Rekognition it comes back with a 59 00:06:04,729 --> 00:06:08,930 response and here it is it'll come back with all of the labels that it's picked 60 00:06:08,930 --> 00:06:14,330 up it's picked up a skateboard with 99.2% confidence and there you can see 61 00:06:14,330 --> 00:06:20,210 there's a whole heap of stuff that is a pic that it has picked up from their 62 00:06:20,210 --> 00:06:26,780 object and scene detection okay so let's see how it works with an image we give 63 00:06:26,780 --> 00:06:30,229 it so we'll click on upload and we'll upload our own image I'm just going to 64 00:06:30,229 --> 00:06:36,740 get a picture of an elephant and upload that and so you can see quite quickly 65 00:06:36,740 --> 00:06:41,150 it's analyzed that image it's found an animal and elephants and wildlife and 66 00:06:41,150 --> 00:06:44,930 that's pretty cool so let's have a look at the other one so I've got image 67 00:06:44,930 --> 00:06:52,550 moderation so what this does is it automatically detects explicit content 68 00:06:52,550 --> 00:06:59,150 so for something for a a children's side you might want to moderate the images 69 00:06:59,150 --> 00:07:02,479 that are being uploaded to that to that side and so this is a great way to do it 70 00:07:02,479 --> 00:07:07,789 so we can see here we've got a family a family image so we just click on view 71 00:07:07,789 --> 00:07:15,830 content and we can see that it's come back with nothing absolutely nothing so 72 00:07:15,830 --> 00:07:20,449 we look at the response and it comes back with moderation labels nothing 73 00:07:20,449 --> 00:07:24,710 the reason it came back with nothing is that it's found nothing that is explicit 74 00:07:24,710 --> 00:07:28,909 or suggestive adult content so let's have a look at the other one of the girl 75 00:07:28,909 --> 00:07:35,180 in the bikini and so there we can see that we have a female swimwear or 76 00:07:35,180 --> 00:07:40,490 underwear 98.7 percent probability that that is there and so that's a great tool 77 00:07:40,490 --> 00:07:45,380 that you know if you really want to you know look after children if you got a 78 00:07:45,380 --> 00:07:50,449 kid's website it's a great way to do it so let's have a look at facial analysis 79 00:07:50,449 --> 00:07:54,949 this is quite a good one so we can see there that we've got a girl she's got 80 00:07:54,949 --> 00:07:57,350 her sunglasses on but it still recognizes 81 00:07:57,350 --> 00:08:02,300 that it's a girl he still recognizes that she's smiling she's wearing 82 00:08:02,300 --> 00:08:07,010 sunglasses and there's a whole heap of information her eyes are open even it 83 00:08:07,010 --> 00:08:11,900 can tell with sunglasses on I don't know how it does that mouth is open and 84 00:08:11,900 --> 00:08:16,880 there's a whole heap of stuff there that it analyzed and we can see here that it 85 00:08:16,880 --> 00:08:23,950 can do the same for multiple faces and you can see that there's a male there 86 00:08:23,950 --> 00:08:28,460 and so we can select each different one so we can select this one and it says if 87 00:08:28,460 --> 00:08:35,120 it appears to be female 100% 11 to 18 years old this one here 23 to 38 years 88 00:08:35,120 --> 00:08:40,340 old so it's quite amazing that it can tell the difference in ages of people 89 00:08:40,340 --> 00:08:48,620 from an image and it can also identify people so here is where it's identifying 90 00:08:48,620 --> 00:08:53,510 from its its database of celebrities we've got Jeff be sauce for it members 91 00:08:53,510 --> 00:09:01,580 on and we've got Andy Jasse from AWS and so it's got a hundred percent much 92 00:09:01,580 --> 00:09:05,000 confidence here so we're going to do this ourselves I'm just going to upload 93 00:09:05,000 --> 00:09:10,630 an image of a couple of celebrities and see whether it can do it for us as well 94 00:09:14,830 --> 00:09:19,640 okay so it's it's how to look at that image and it's identified that Keith Urban 95 00:09:19,640 --> 00:09:24,650 and Nicole Kidman are in that image with a hundred percent confidence 96 00:09:24,650 --> 00:09:28,460 I reckon that's pretty amazing actually but hey that's the whole thing about 97 00:09:28,460 --> 00:09:33,050 facial recognition is that we're in a whole different world now that computers 98 00:09:33,050 --> 00:09:39,890 can recognize who we are so let's have a look at comparison so here we have an 99 00:09:39,890 --> 00:09:44,480 image on the left of a girl and an image of the same girl with a group of other 100 00:09:44,480 --> 00:09:48,190 girls and here we can see that it's identified a ninety-eight percent 101 00:09:48,190 --> 00:09:53,510 probability that they are the same girl and it's not the other two girls we can 102 00:09:53,510 --> 00:09:59,690 do the same with a different image and so here we can see that it's identified 103 00:09:59,690 --> 00:10:06,650 that it is a girl on the right let's have a look at another one and it has 104 00:10:06,650 --> 00:10:12,019 found that girl as well in the other image and it's and it's identified that 105 00:10:12,019 --> 00:10:17,779 she's not the other two girls so again the facial recognition is really quite 106 00:10:17,779 --> 00:10:23,389 powerful let's have a look at text and image so here we can see it's picked up 107 00:10:23,389 --> 00:10:30,310 text from an image and it's picked up the number plate on a car so obviously 108 00:10:30,310 --> 00:10:33,860 there's a lot of stuff that can happen here you know it's obviously you're 109 00:10:33,860 --> 00:10:39,019 going to be having a toll on a bridge or something like that great service for 110 00:10:39,019 --> 00:10:48,050 doing that let's have a look at video analysis okay so here's a video I'll 111 00:10:48,050 --> 00:10:55,940 just play it we can see there's just a video from AWS live and it is picked up 112 00:10:55,940 --> 00:10:59,480 that there are two people here and two of them are celebrities are both 113 00:10:59,480 --> 00:11:03,769 celebrities so let's have a look at that so we've got those two celebrities and 114 00:11:03,769 --> 00:11:09,889 it's identified there we go mr. Vogel's and mr. Bezos and it's also identified 115 00:11:09,889 --> 00:11:13,010 some objects in there so it's picked up the furniture and the chair and that 116 00:11:13,010 --> 00:11:20,449 someone's wearing it as someone's got a beard and it's picked up quite a bit so 117 00:11:20,449 --> 00:11:25,339 that brings us to the end of this little run-through of Amazon recognition and by 118 00:11:25,339 --> 00:11:29,540 all means open it up and how to play around with it yourself and try and 119 00:11:29,540 --> 00:11:32,720 think about what you can do with it because remember this is if you're a 120 00:11:32,720 --> 00:11:38,149 developer you can use this as a back-end by just using the JavaScript SDK which 121 00:11:38,149 --> 00:11:43,339 interfaces nicely with this and you can you know that you can come up with some 122 00:11:43,339 --> 00:11:47,870 really interesting ideas for applications I'll see you in the next 123 00:11:47,870 --> 00:11:50,050 one