Book Image

Computer Vision on AWS

By : Lauren Mullennex, Nate Bachmeier, Jay Rao
Book Image

Computer Vision on AWS

By: Lauren Mullennex, Nate Bachmeier, Jay Rao

Overview of this book

Computer vision (CV) is a field of artificial intelligence that helps transform visual data into actionable insights to solve a wide range of business challenges. This book provides prescriptive guidance to anyone looking to learn how to approach CV problems for quickly building and deploying production-ready models. You’ll begin by exploring the applications of CV and the features of Amazon Rekognition and Amazon Lookout for Vision. The book will then walk you through real-world use cases such as identity verification, real-time video analysis, content moderation, and detecting manufacturing defects that’ll enable you to understand how to implement AWS AI/ML services. As you make progress, you'll also use Amazon SageMaker for data annotation, training, and deploying CV models. In the concluding chapters, you'll work with practical code examples, and discover best practices and design principles for scaling, reducing cost, improving the security posture, and mitigating bias of CV workloads. By the end of this AWS book, you'll be able to accelerate your business outcomes by building and implementing CV into your production environments with the help of AWS AI/ML services.
Table of Contents (21 chapters)
1
Part 1: Introduction to CV on AWS and Amazon Rekognition
5
Part 2: Applying CV to Real-World Use Cases
9
Part 3: CV at the edge
12
Part 4: Building CV Solutions with Amazon SageMaker
15
Part 5: Best Practices for Production-Ready CV Workloads

Setting up your AWS environment

In the following chapters, you will need access to an AWS account to run the code examples. If you already have an AWS account, feel free to skip this section and move on to the next chapter.

Note

Please use the AWS Free Tier, which allows you to try services free of charge based on certain service usage limits or time limits. See https://aws.amazon.com/free for more details.

Follow the instructions at https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html to sign up for an AWS account, then proceed as follows:

  1. Once the AWS account is created, sign in using your email address and password and access the AWS Management Console at https://console.aws.amazon.com/.
  2. Type IAM in the services search bar at the top of the console and select IAM to navigate to the IAM console. Select Users from the left panel in the IAM console and select on Add User.
  3. Enter a User name value, then select Programmatic access and AWS Management Console access for Access type. Keep the Console password setting as Autogenerated password, and keep Require password reset as selected:
Figure 1.10 – Setting your IAM username and access type

Figure 1.10 – Setting your IAM username and access type

  1. Select Next: Permissions. On the Set permissions page, select on Attach existing policies directly and select the checkbox to the left of AdministratorAccess. Select Next twice to go to the Review page. Select Create user:
Figure 1.11 – Adding Administrator access for IAM user

Figure 1.11 – Adding Administrator access for IAM user

  1. Now, go back to the AWS Management Console (console.aws.amazon.com) and select Sign In. Provide the IAM username you created in the previous step along with a temporary password, and enter a new password to log in to the console.

Creating an Amazon SageMaker Jupyter notebook instance

We will be using Jupyter Notebooks to run our code in the following chapters. Please execute the following steps to create a notebook instance in Amazon SageMaker:

  1. In the AWS Management Console, type SageMaker in the services search bar at the top of the page, and select on it to access the Amazon SageMaker console.
  2. On the left panel, select on Notebook to expand, and select Notebook instances.
  3. At the top right of the Notebook instances page, select Create notebook instance.
  4. Under Notebook instance settings, type a name for Notebook instance name. For Notebook instance type, select m1.t3.medium since it falls under the AWS Free Tier:
Figure 1.12 – Amazon SageMaker: Notebook instance settings

Figure 1.12 – Amazon SageMaker: Notebook instance settings

  1. Under the Permissions and encryption section, select the IAM role list and choose Create a new role. Specify Any S3 bucket to provide access to all S3 buckets.
  2. Leave the rest of the default options in the remaining sections and select Create notebook instance.
  3. It will take a few minutes for the notebook instance to provision. Once the status is InService, you are ready to proceed. The following chapters will provide instructions for executing the code examples.

Now, you are ready to deploy the code examples that will show you how to use AWS AI/ML services to deploy CV solutions. Throughout the rest of the book, you will use a SageMaker notebook instance for these steps.