SlideShare a Scribd company logo
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kashif Imran
Solutions Architect, Amazon Web Services
BDA210
AWS DeepLens Workshop: Building a
Computer Vision App
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS DeepLens
is not a
video camera …
It’s the
world’s first
deep learning
enabled
developer kit
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Artificial Intelligence at Amazon
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Get Started with Sample Projects
Artistic style
transfer
Object
detection
Face detection /
recognition
Hot dog / not
hot dog
Cat vs. dogActivity
detection
Add custom functionality
Or
Create your own project
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3. Deploying a model
to AWS DeepLens
1. Machine learning
overview
4. Extending a
project
Today We Will Cover
2. Training a model
in Amazon
SageMaker
Amazon
Rekognition
Amazon S3
AWS Lambda
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1. Machine Learning Overview
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model training Inference
Overview of Deep Learning
Data
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data
Annotate Preprocess Data split
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training
• Define model architecture
• Input the annotated and cleaned data into the model
• Multiple iterations (epochs) to train the model
• Validate with held back dataset
Large,
annotated
dataset
Training set
Validation set
Training
Validate
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Inference
It’s where the magic happens!
1. Preprocess the new data or image just like a training set.
2. Feed image back to the trained model to get a predicted output.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2. Training a Model in Amazon SageMaker
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lab #1: Training a Model in Amazon SageMaker
• Objective: You will learn how to build and train a face recognition
model
• Time: 40 min.
• Steps:
1. About Amazon
SageMaker
2. Self-paced lab
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
Fully managed
hosting with auto-
scaling
One-click
deployment
Pre-built
notebooks for
common
problems
Built-in, high-
performance
algorithms
Hyperparameter
optimization
Build Train Deploy
One-click
training
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lab Details – Amazon SageMaker
The self-paced lab will include the following steps:
1. Import a prepared Jupyter Notebook into Amazon SageMaker.
2. The notebook walks you through building a face recognition
model in Amazon SageMaker.
3. Create an S3 bucket, and export the updated model there.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Self-Paced Lab – #1
1. Find the instructions manual here:
https://github.com/fibbonnaci/DeepLens-workshops
40 minutes
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3. Deploying a Model to DeepLens
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lab #2: Deploying a Model to AWS DeepLens
• Objective: You will learn how to configure AWS DeepLens and deploy a
model
• Time: 40 min.
• Steps:
1. Register and
configure AWS
DeepLens
2. Deploy a model
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Register AWS DeepLens
1. Choose Register device.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2. Provide a name for your device, for example, yourname-sf-summit
3. Choose Next.
Register AWS DeepLens
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Manage Permissions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Manage Permissions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Manage Permissions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Manage Permissions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Download Certificate
1. Choose Download certificate.
2. Choose Finish.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Configure AWS DeepLens
1. Find the reset pin in the back of the AWS DeepLens device.
2. Use the provided pin to reset the device. You should hear a click.
3. The middle LED (Wi-Fi) will be blinking.
4. Connect to 192.168.0.1.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
5. For Network connection, choose Edit.
Configure AWS DeepLens
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
6. Choose Use Ethernet.
Configure AWS DeepLens
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
7. For Certificate, choose Edit.
Configure AWS DeepLens
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
8. Upload the .zip file you downloaded during registration.
9. Choose Next.
Configure AWS DeepLens
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
10. Choose Finish.
Configure AWS DeepLens
Run this step before moving ahead
sudo systemctl restart greengrassd.service --no-block
1. Open Terminal, and run this command:
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Now, It’s Time to Create a Project
1. Log in to the AWS DeepLens
console.
https://console.aws.amazon.com/
deeplens
This is the AWS DeepLens console.
2. Choose Create Project.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Use a Face Detection Sample
3. Select Use a project
template.
4. Select Face detection from
sample project templates.
5. Choose Next at the bottom
of screen.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Create a Project
6. Choose Create.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deploy Project to the Device
7. Find your project in
the list (the one you
just named).
8. Choose the radio
button.
9. Choose Deploy to
device.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
10. Select your device.
11. Choose Review.
Target Your Device
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deploy!
12. Choose Deploy.
A note on costs …
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Wait for the Project to be Deployed
Blue banner = Deployment in progress
Green banner = Deployment successful
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS DeepLens Specifications
• Intel Atom Processor
• Gen9 graphics
• Ubuntu OS- 16.04 LTS
• 100 GFLOPS performance
• Dual band Wi-Fi
• 8-GB RAM
• 16-GB storage (eMMC)
• 32-GB SD card
• 4 MP camera with MJPEG
• H.264 encoding at 1080p resolution
• 2 USB ports
• Micro HDMI
• Audio out
• AWS Greengrass preconfigured
• clDNN Optimized for MXNet
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS DeepLens Architecture
Video out
Data out
I n f e r e n c e
D e p l o y P r o j e c t s
Manage device
Security
Console Project
Management
AWS Cloud
Intel: Model Optimizer
cIDNN and Driver
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Under the Covers – Console
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Under the Covers – Device
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Let’s go back to the console and view the
output
13. Click View project stream for instructions.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Winners of the DeepLens Hackathon
First place Second place Third place
ReadToMe
Created by Alex Schultz
ReadToMe is a deep learning
enabled application that is
able to read books to kids. In
this case, reading Green Eggs
and Ham, by Dr. Seuss.
Dee
Created by Matthew Clark
Dee is a fun AWS DeepLens
interactive device for children.
The device asks children to
answer questions by showing a
picture of the answer.
SafeHaven
Created by Nathan Stone
and Peter McLean
SafeHaven uses Alexa and
AWS DeepLens to bring
peace of mind for vulnerable
people and their families.
View all 23 projects at: https://aws.amazon.com/deeplens/community-projects
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4. Extending a Project:
Audience Response Tracking with AWS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon
Rekognition
image
Inference
Lambda
Amazon
S3 Bucket
Amazon
DynamoDB
Amazon
SageMaker
&
AWS
DeepLens
console
Amazon
S3 Bucket
Recognize
emotions
Lambda
Training/validation data
Cropped face images
Cropped face
images
Detected
emotions
AWS DeepLens
Cloud
Amazon
CloudWatch
Detected
emotions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Now, let’s see it in action.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thanks & Wrap-Up
Pre-order
aws.amazon.com/deeplens/
Learn more
aws.amazon.com/deeplens/
community-projects
Request a workshop
Work with your AWS
account management
team to request a hands-
on Amazon SageMaker &
AWS DeepLens workshop
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Questions?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Please complete the session survey in the
summit mobile app.
Submit Session Feedback
1. Tap the Schedule icon. 2. Select the session
you attended.
3. Tap Session Evaluation
to submit your feedback.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!

More Related Content

AWS DeepLens Workshop: Building Computer Vision Applications

  • 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kashif Imran Solutions Architect, Amazon Web Services BDA210 AWS DeepLens Workshop: Building a Computer Vision App
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS DeepLens is not a video camera … It’s the world’s first deep learning enabled developer kit
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Artificial Intelligence at Amazon
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Get Started with Sample Projects Artistic style transfer Object detection Face detection / recognition Hot dog / not hot dog Cat vs. dogActivity detection Add custom functionality Or Create your own project
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3. Deploying a model to AWS DeepLens 1. Machine learning overview 4. Extending a project Today We Will Cover 2. Training a model in Amazon SageMaker Amazon Rekognition Amazon S3 AWS Lambda
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1. Machine Learning Overview
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model training Inference Overview of Deep Learning Data
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Data Annotate Preprocess Data split
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training • Define model architecture • Input the annotated and cleaned data into the model • Multiple iterations (epochs) to train the model • Validate with held back dataset Large, annotated dataset Training set Validation set Training Validate
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Inference It’s where the magic happens! 1. Preprocess the new data or image just like a training set. 2. Feed image back to the trained model to get a predicted output.
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2. Training a Model in Amazon SageMaker
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lab #1: Training a Model in Amazon SageMaker • Objective: You will learn how to build and train a face recognition model • Time: 40 min. • Steps: 1. About Amazon SageMaker 2. Self-paced lab
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon SageMaker Fully managed hosting with auto- scaling One-click deployment Pre-built notebooks for common problems Built-in, high- performance algorithms Hyperparameter optimization Build Train Deploy One-click training
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lab Details – Amazon SageMaker The self-paced lab will include the following steps: 1. Import a prepared Jupyter Notebook into Amazon SageMaker. 2. The notebook walks you through building a face recognition model in Amazon SageMaker. 3. Create an S3 bucket, and export the updated model there.
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Self-Paced Lab – #1 1. Find the instructions manual here: https://github.com/fibbonnaci/DeepLens-workshops 40 minutes
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3. Deploying a Model to DeepLens
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lab #2: Deploying a Model to AWS DeepLens • Objective: You will learn how to configure AWS DeepLens and deploy a model • Time: 40 min. • Steps: 1. Register and configure AWS DeepLens 2. Deploy a model
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Register AWS DeepLens 1. Choose Register device.
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2. Provide a name for your device, for example, yourname-sf-summit 3. Choose Next. Register AWS DeepLens
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Manage Permissions
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Manage Permissions
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Manage Permissions
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Manage Permissions
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Download Certificate 1. Choose Download certificate. 2. Choose Finish.
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Configure AWS DeepLens 1. Find the reset pin in the back of the AWS DeepLens device. 2. Use the provided pin to reset the device. You should hear a click. 3. The middle LED (Wi-Fi) will be blinking. 4. Connect to 192.168.0.1.
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 5. For Network connection, choose Edit. Configure AWS DeepLens
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 6. Choose Use Ethernet. Configure AWS DeepLens
  • 28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 7. For Certificate, choose Edit. Configure AWS DeepLens
  • 29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 8. Upload the .zip file you downloaded during registration. 9. Choose Next. Configure AWS DeepLens
  • 30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 10. Choose Finish. Configure AWS DeepLens
  • 31. Run this step before moving ahead sudo systemctl restart greengrassd.service --no-block 1. Open Terminal, and run this command:
  • 32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Now, It’s Time to Create a Project 1. Log in to the AWS DeepLens console. https://console.aws.amazon.com/ deeplens This is the AWS DeepLens console. 2. Choose Create Project.
  • 33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Use a Face Detection Sample 3. Select Use a project template. 4. Select Face detection from sample project templates. 5. Choose Next at the bottom of screen.
  • 34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Create a Project 6. Choose Create.
  • 35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deploy Project to the Device 7. Find your project in the list (the one you just named). 8. Choose the radio button. 9. Choose Deploy to device.
  • 36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 10. Select your device. 11. Choose Review. Target Your Device
  • 37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deploy! 12. Choose Deploy. A note on costs …
  • 38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Wait for the Project to be Deployed Blue banner = Deployment in progress Green banner = Deployment successful
  • 39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS DeepLens Specifications • Intel Atom Processor • Gen9 graphics • Ubuntu OS- 16.04 LTS • 100 GFLOPS performance • Dual band Wi-Fi • 8-GB RAM • 16-GB storage (eMMC) • 32-GB SD card • 4 MP camera with MJPEG • H.264 encoding at 1080p resolution • 2 USB ports • Micro HDMI • Audio out • AWS Greengrass preconfigured • clDNN Optimized for MXNet
  • 40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS DeepLens Architecture Video out Data out I n f e r e n c e D e p l o y P r o j e c t s Manage device Security Console Project Management AWS Cloud Intel: Model Optimizer cIDNN and Driver
  • 41. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Under the Covers – Console
  • 42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Under the Covers – Device
  • 43. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Let’s go back to the console and view the output 13. Click View project stream for instructions.
  • 44. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Winners of the DeepLens Hackathon First place Second place Third place ReadToMe Created by Alex Schultz ReadToMe is a deep learning enabled application that is able to read books to kids. In this case, reading Green Eggs and Ham, by Dr. Seuss. Dee Created by Matthew Clark Dee is a fun AWS DeepLens interactive device for children. The device asks children to answer questions by showing a picture of the answer. SafeHaven Created by Nathan Stone and Peter McLean SafeHaven uses Alexa and AWS DeepLens to bring peace of mind for vulnerable people and their families. View all 23 projects at: https://aws.amazon.com/deeplens/community-projects
  • 45. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4. Extending a Project: Audience Response Tracking with AWS
  • 46. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 47. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Rekognition image Inference Lambda Amazon S3 Bucket Amazon DynamoDB Amazon SageMaker & AWS DeepLens console Amazon S3 Bucket Recognize emotions Lambda Training/validation data Cropped face images Cropped face images Detected emotions AWS DeepLens Cloud Amazon CloudWatch Detected emotions
  • 48. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Now, let’s see it in action.
  • 49. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thanks & Wrap-Up Pre-order aws.amazon.com/deeplens/ Learn more aws.amazon.com/deeplens/ community-projects Request a workshop Work with your AWS account management team to request a hands- on Amazon SageMaker & AWS DeepLens workshop
  • 50. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Questions?
  • 51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Please complete the session survey in the summit mobile app.
  • 52. Submit Session Feedback 1. Tap the Schedule icon. 2. Select the session you attended. 3. Tap Session Evaluation to submit your feedback.
  • 53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you!