- 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.
- 電力自動化實用技術問答
- 并行數據挖掘及性能優化:關聯規則與數據相關性分析
- UTM(統一威脅管理)技術概論
- Hands-On Linux for Architects
- 我也能做CTO之程序員職業規劃
- Mastering ServiceNow Scripting
- LAMP網站開發黃金組合Linux+Apache+MySQL+PHP
- Word 2007,Excel 2007辦公應用融會貫通
- 筆記本電腦電路分析與故障診斷
- 數字多媒體技術基礎
- 貫通Hibernate開發
- Puppet 3 Beginner’s Guide
- 手把手教你學Photoshop CS3
- Microsoft System Center Data Protection Manager Cookbook
- 中老年人學電腦與上網