Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Adrian Hornsby, Technical Evangelist
http://inse...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Technical Evangelist, Developer Advocate,
… So...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What to expect
• Quick intro
• 3 demo applicatio...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AI and Serverless
…like Salt and Pepper
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event driven
A B CEvent on B by A triggers C
Inv...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How Lambda works
S3 event
notifications
DynamoDB...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event-driven using Lambda
AWS Lambda:
Resize Ima...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
No servers to provision
or manage
Scales with us...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EVENT DRIVEN CONTINUOUS SCALING PAY BY USAGE
Ser...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The rise of AI
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The Advent of AI & Deep Learning
Data
GPUs
& Acc...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AI On AWS Today
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AI & Deep Learning in the hands of every develop...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliat...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Polly: Text In, Life-like Speech Out
Amazon Poll...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
https://www.w3.org/TR/speech-synthesis/
<speak>
...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
<API>
Amazon Polly
</API>
aws polly synthesize-s...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
<demo>
PollyCast
</demo>
* Initial project by Ja...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliat...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon
Rekognition
Object and scene detection
Fa...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
<API>
Amazon Rekognition
</API>
aws rekognition ...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Detect labels with
Rekognition
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Add
Rekognition tags
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Extract Image
Metadata
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Step Functions:
Orchestrate a Serverless pro...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
<demo>
Image Recognition and Processing Backend
...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
<demo>
Image Recognition and Processing Backend
...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
<demo>
Poliko
powered by Amazon Polly & Rekognit...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo - Poliko
Poliko
Take Pic
Amazon Cognito
2. ...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliat...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
One-Click
Deep Learning
AWS Deep Learning AMIs
A...
0.2
-0.1
...
0.7
Input Output
1 1 1
1 0 1
0 0 0
3
mx.sym.Pooling(data, pool_type="max", kernel=(2,2), stride=(2,2)
lstm.ls...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Early detection of diabetic
complications
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Autonomous Driving Systems
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Real Time, Per Pixel Object Segmentation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Pre-trained MXNet
models
http://data.mxnet.io/mo...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ResNet – Deep Learning
Based on:
Deep Residual L...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scale Predictions with AWS Lambda and MXNet
AWS ...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Predict with AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Predict with AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Predict with AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Predict with AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AI for everyone!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thanks you!
Developing Sophisticated Serverless Applications with AI
Developing Sophisticated Serverless Applications with AI
Upcoming SlideShare
Loading in …5
×

Developing Sophisticated Serverless Applications with AI

1,121 views

Published on

The slides from my talk at the Serverless Summit in India http://inserverless.com
Developing advanced AI enabled applications with serverless technology on AWS

Published in: Technology

Developing Sophisticated Serverless Applications with AI

  1. 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Adrian Hornsby, Technical Evangelist http://inserverless.com - 2017 Developing Sophisticated Serverless Applications with AI
  2. 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Technical Evangelist, Developer Advocate, … Software Engineer • Own bed in Finland • Previously: • Solutions Architect @AWS • Lead Cloud Architect @Dreambroker • Director of Engineering, Software Engineer, DevOps, Manager, ... @Hdm • Researcher @Nokia Research Center • and a bunch of other stuff. • Climber, like Ginger shots.
  3. 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What to expect • Quick intro • 3 demo applications • Polly • Rekognition • MXnet • Wrap up.
  4. 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AI and Serverless …like Salt and Pepper
  5. 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event driven A B CEvent on B by A triggers C Invocation Lambda functions Action
  6. 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How Lambda works S3 event notifications DynamoDB Streams Kinesis events Cognito events SNS events Custom events CloudTrail events LambdaDynamoDB Kinesis S3 Any custom Invoked in response to events - Changes in data - Changes in state Redshift SNS Access any service, including your own Such as… Lambda functions CloudWatch events
  7. 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event-driven using Lambda AWS Lambda: Resize Images Users upload photos S3: Source Bucket S3: Destination Bucket Triggered on PUTs
  8. 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. No servers to provision or manage Scales with usage Never pay for idle Availability and fault tolerance built in Serverless means…
  9. 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. EVENT DRIVEN CONTINUOUS SCALING PAY BY USAGE Serverless means…
  10. 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The rise of AI
  11. 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The Advent of AI & Deep Learning Data GPUs & Acceleration Cloud Computing Algorithms AWS
  12. 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  13. 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AI On AWS Today
  14. 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AI & Deep Learning in the hands of every developer
  15. 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Voice enabled applications
  16. 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Polly: Text In, Life-like Speech Out Amazon Polly “Today in Seattle, WA it’s 11°F” “Today in Seattle Washington it’s 11 degrees Fahrenheit”
  17. 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://www.w3.org/TR/speech-synthesis/ <speak> The spelling of my name is <prosody rate='x-slow'> <say-as interpret-as="characters">Adrian</say-as> </prosody> </speak> A Focus On Voice Quality & Pronunciation
  18. 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. <API> Amazon Polly </API> aws polly synthesize-speech --text "It was nice to live such a wonderful live show" --output-format mp3 --voice-id Joanna --text-type text johanna.mp3
  19. 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  20. 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. <demo> PollyCast </demo> * Initial project by James Siri, Piotr Lewalski https://github.com/adhorn/pollycast
  21. 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Image analysis
  22. 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Rekognition Object and scene detection Facial analysis Face comparison Celebrity recognition Image moderation Rekognition: Images In, Rich Metadata Out
  23. 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. <API> Amazon Rekognition </API> aws rekognition detect-faces --image '{"S3Object":{"Bucket":"adhorn-reko","Name":"horse.jpg"}}' --attributes "ALL" aws rekognition detect-labels --image '{"S3Object":{"Bucket":"adhorn-reko","Name":"horse.jpg"}}'
  24. 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  25. 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Detect labels with Rekognition
  26. 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Add Rekognition tags
  27. 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Extract Image Metadata
  28. 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Step Functions: Orchestrate a Serverless processing workflow using AWS Lambda
  29. 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. <demo> Image Recognition and Processing Backend Step Functions </demo> https://github.com/awslabs/lambda-refarch-imagerecognition
  30. 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. <demo> Image Recognition and Processing Backend Step Functions </demo> https://github.com/awslabs/lambda-refarch-imagerecognition
  31. 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. <demo> Poliko powered by Amazon Polly & Rekognition </demo> http://poliko.adhorn.me
  32. 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo - Poliko Poliko Take Pic Amazon Cognito 2. Detect Labels 4. Synthesize-speech Amazon Rekognition Amazon Polly 3. Detect Faces Amazon S3 “Static website hosting” enabled
  33. 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Learning enabled applications
  34. 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. One-Click Deep Learning AWS Deep Learning AMIs Amazon Linux & Ubuntu Up to~40k CUDA cores Apache MXNet TensorFlow Theano Keras Caffe CNTK Torch Pre-configured CUDA drivers Anaconda, Python3 Out-of-the-box Tutorials + CloudFormation template + Container Image Available in the AWS Marketplace AI Frameworks on AWS
  35. 35. 0.2 -0.1 ... 0.7 Input Output 1 1 1 1 0 1 0 0 0 3 mx.sym.Pooling(data, pool_type="max", kernel=(2,2), stride=(2,2) lstm.lstm_unroll(num_lstm_layer, seq_len, len, num_hidden, num_embed) 4 2 2 0 4=Max 1 3 ... 4 0.2 -0.1 ... 0.7 mx.sym.FullyConnected(data, num_hidden=128) 2 mx.symbol.Embedding(data, input_dim, output_dim = k) Queen 4 2 2 0 2=Avg Input Weights cos(w, queen) = cos(w, king) - cos(w, man) + cos(w, woman) mx.sym.Activation(data, act_type="xxxx") "relu" "tanh" "sigmoid" "softrelu" Neural Art Face Search Image Segmentation Image Caption “People Riding Bikes” Bicycle, People, Road, Sport Image Labels Image Video Speech Text “People Riding Bikes” Machine Translation “Οι άνθρωποι ιππασίας ποδήλατα” Events mx.model.FeedForward model.fit mx.sym.SoftmaxOutput Anatomy of a Deep Learning Model mx.sym.Convolution(data, kernel=(5,5), num_filter=20)
  36. 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Early detection of diabetic complications
  37. 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Autonomous Driving Systems
  38. 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Real Time, Per Pixel Object Segmentation
  39. 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Pre-trained MXNet models http://data.mxnet.io/models/imagenet/
  40. 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ResNet – Deep Learning Based on: Deep Residual Learning for Image Recognition Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun https://arxiv.org/pdf/1512.03385.pdf https://medium.com/towards-data-science/neural-network-architectures-156e5bad51ba
  41. 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Scale Predictions with AWS Lambda and MXNet AWS LambdaAmazon API Gateway Amazon S3 Training Inference https://aws.amazon.com/blogs/compute/seamlessly-scale-predictions-with-aws-lambda-and-mxnet/
  42. 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Predict with AWS Lambda
  43. 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Predict with AWS Lambda
  44. 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Predict with AWS Lambda
  45. 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Predict with AWS Lambda
  46. 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AI for everyone!
  47. 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thanks you!

×