- Hands-On Artificial Intelligence on Amazon Web Services
- Subhashini Tripuraneni Charles Song
- 651字
- 2021-06-24 12:48:42
Test driving the Amazon Rekognition service
Let's try out one of the AWS-managed AI services, Amazon Rekognition, to get a feel for the power of AWS's AI offerings:
- Click on Rekognition from the list of services under Machine Learning to navigate to its home page.
- Rekognition provides a collection of visual analyses for images and videos. With Rekognition, you can quickly add powerful capabilities to detect objects, faces, and text in images and videos. You do not need to understand the deep learning technologies behind these capabilities in order to add them to your applications. We will create several such applications in the hands-on projects throughout this book, but for now, let's see Rekognition's capabilities in action with one of the provided demos.
- From the Amazon Rekognition home page's left-hand pane, click on Object and scene detection under the Demos section.
- AWS has already provided a couple of sample images to show off the power of Rekognition. In one of the images, you and I can easily see that a skateboarder is performing a trick on a road with two rows of parked cars on either side. This is actually a pretty busy image for computers to perform analysis on.
- So, how did Rekognition do? Rekognition has drawn boxes around the objects that it has detected, and you can mouse over the boxes in order to see what Rekognition thinks each object is.
Here is the Rekognition demo page with the skateboarder image detection results:

- On the right-hand side of the image, under Results, Rekognition also provides the confidence levels for all the objects that it has detected.
There are also Request and Response underneath the confidence levels. In fact, this demo page is actually making API calls to Rekognition's object and scene detection API on your behalf. If you expand the request, it reveals some details about the API call:
{
"Image": {
"S3Object": {
"Bucket": "console-sample-images",
"Name": "skateboard.jpg"
}
}
}
The request is in the JavaScript Object Notation or JSON format. The request specifies an image that is to be analyzed by the Rekognition API. More specifically, this is an image that's stored as an object in the Amazon Simple Storage Service or S3. From the request, we can tell that the image is stored in the console-sample-images bucket, with the name of skateboard.jpg.
This demo application is using the Amazon S3 service to store the sample images, and Rekognition can directly analyze images that are stored in S3. We will be leveraging this pattern in many of the projects in later chapters as well. As we mentioned earlier, the power of the AWS ecosystem is the interoperability of many of its services.
The response is also in JSON format. The response contains a lot of information about the objects that were detected in the sample image. This information includes the name of the object, the confidence of the detection, and even the coordinates for the bounding box where each object is located within the image. In our projects, we will learn how to process such JSON responses in order to use the results in our intelligent-enabled applications.
In this demo, you can also upload your own images to test out Rekognition. Find an image and give it a try. When you upload your image to the demo page, you will notice that the request that is sent to the API is slightly different. In the request, you will see the following:
{
"Image": {
"Bytes”: “...”
}
}
This time, instead of specifying an image in S3, the raw bytes of the image that was uploaded were sent directly to the Rekognition API. This Rekognition API has multiple variations: one that takes reference to an S3 object and another that takes the raw bytes of an image. Which variation you choose depends on the nature of your application.
- Unreal Engine:Game Development from A to Z
- AutoCAD繪圖實(shí)用速查通典
- Cloud Analytics with Microsoft Azure
- 大數(shù)據(jù)改變世界
- 機(jī)器學(xué)習(xí)與大數(shù)據(jù)技術(shù)
- 計(jì)算機(jī)網(wǎng)絡(luò)應(yīng)用基礎(chǔ)
- 21天學(xué)通C++
- Mastering Elastic Stack
- Maya極速引擎:材質(zhì)篇
- 系統(tǒng)安裝與重裝
- Dreamweaver CS6精彩網(wǎng)頁制作與網(wǎng)站建設(shè)
- 基于企業(yè)網(wǎng)站的顧客感知服務(wù)質(zhì)量評價(jià)理論模型與實(shí)證研究
- ZigBee無線通信技術(shù)應(yīng)用開發(fā)
- 深度學(xué)習(xí)原理與 TensorFlow實(shí)踐
- 案例解說Delphi典型控制應(yīng)用