官术网_书友最值得收藏!

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:

  1. Click on Rekognition from the list of services under Machine Learning to navigate to its home page.
  2. 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.
  1. From the Amazon Rekognition home page's left-hand pane, click on Object and scene detection under the Demos section.
  2. 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.
  3. 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:

  1. 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.

主站蜘蛛池模板: 榆林市| 盐山县| 盐津县| 康保县| 龙胜| 金昌市| 思南县| 禹城市| 磐石市| 满洲里市| 图们市| 阿图什市| 铜梁县| 蒙阴县| 尼玛县| 左云县| 甘泉县| 绵阳市| 渭南市| 瓦房店市| 长白| 榆树市| 清丰县| 望谟县| 永川市| 彰化市| 巨鹿县| 澎湖县| 望江县| 汽车| 三门县| 博兴县| 清流县| 张家港市| 金寨县| 仙游县| 张家港市| 本溪市| 玉田县| 稷山县| 娱乐|