Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

An Introduction to Amazon AI Services

An Introduction to Amazon AI Services

AWS User Group Barcelona, March 2nd, 2017

Introducing the new Amazon AI services (Rekognition, Polly, Lex) with some demos and some considerations on how to use machine learning engines (such as Apache MXNet) on AWS.

Danilo Poccia

March 03, 2017
Tweet

More Decks by Danilo Poccia

Other Decks in Programming

Transcript

  1. HYBRID ARCHITECTURE Data Backups Integrated App Deployments Direct Connect Identity

    Federation Integrated Resource Management Integrated Networking VMware Integration MARKETPLACE Business Apps Databases DevOps Tools Networking Security Storage Business Intelligence INFRASTRUCTURE Availability Zones Points of Presence Regions CORE SERVICES Compute VMs, Auto-scaling, Load Balancing, Containers, Cloud functions Storage Object, Blocks, File, Archivals, Import/Export Databases Relational, NoSQL, Caching, Migration CDN Networking VPC, DX, DNS Access Control Identity Management Key Management & Storage Monitoring & Logs SECURITY & COMPLIANCE Resource & Usage Auditing Configuration Compliance Web application firewall Assessment and reporting TECHNICAL & BUSINESS SUPPORT Support Professional Services Account Management Partner Ecosystem Solutions Architects Training & Certification Security & Billing Reports Optimization Guidance ENTERPRISE APPS Backup Corporate Email Sharing & Collaboration Virtual Desktops IoT Rules Engine Registry Device Shadows Device Gateway Device SDKs DEVELOPMENT & OPERATIONS MOBILE SERVICES APP SERVICES ANALYTICS Data Warehousing Hadoop/ Spark Streaming Data Collection Machine Learning Elastic Search Push Notifications Identity Sync Resource Templates One-click App Deployment Triggers Containers DevOps Resource Management Application Lifecycle Management API Gateway Transcoding Queuing & Notifications Email Workflow Search Streaming Data Analysis Business Intelligence Mobile Analytics Single Integrated Console Mobile App Testing Data Pipelines Petabyte-Scale Data Migration Database Migration Schema Conversion Application Migration MIGRATION
  2. Artificial Intelligence & Deep Learning At Amazon Thousands Of Employees

    Across The Company Focused on AI Discovery & Search Fulfilment & Logistics Add ML-powered features to existing products Echo & Alexa
  3. Real Machine Learning Happening On AWS Computer Vision APIs Detect

    Online Payment Fraud Computer Vision For Crowd Sourced Maps Computer Vision For Autonomous Driving ML At Large Scale Luxury Real Estate Purchase Predictions Recommendation Engine Forecast Customer Traffic Predictive Analytics On Sports Plays Image Recognition Search Zestimate (using Apache Spark) Insurance
  4. Artificial Intelligence on AWS P2 / FPGA / Elastic GPUs

    Deep Learning AMI and template Investment in Apache MXNet
  5. Elastic GPUs On EC2 P2 M4 D2 X1 G2 T2

    R4 I3 C5 General Purpose GPU General Purpose Dense storage Large memory Graphics intensive Memory intensive High I/O Compute intensive Burstable Lightsail Simple VPS F1 FPGAs Instance Families
  6. Up to 40 thousand parallel processing cores 70 teraflops (single

    precision) over 23 teraflops (double precision) Instance Size GPUs GPU Peer to Peer vCPUs Memory (GiB) Network Bandwidth* p2.xlarge 1 - 4 61 1.25Gbps p2.8xlarge 8 Y 32 488 10Gbps p2.16xlarge 16 Y 64 732 20Gbps *In a placement group Amazon EC2 P2 Instances
  7. Elastic GPUs For EC2: GPU Acceleration For Graphics Workloads 1GiB

    GPU Memory 2 GiB 4 GiB 8 GiB Current Generation EC2 Instance
  8. F1 Instances: Bringing Hardware Acceleration To All FPGA Images Available

    In AWS Marketplace F1 Instance With your custom logic running on an FPGA Develop, simulate, debug & compile your code Package as FPGA Images
  9. Deep Learning Frameworks MXNet, Caffe, Tensorflow, Theano, Torch, CNTK and

    Keras Pre-installed components to speed productivity, such as Nvidia drivers, CUDA, cuDNN, Intel MKL-DNN with MXNet, Anaconda, Python 2 and 3 AWS Integration Deep Learning AMI
  10. Amazon Rekognition: Images In, Categories and Facial Analysis Out Amazon

    Rekognition Car Outside Daytime Driving Objects & Scenes Female Smiling Sunglasses Faces
  11. Deep Learning Process Conv 1 Conv 2 Conv n …

    … Feature Maps Labrador Dog Beach Outdoors Softmax Probability Fully Connected Layer
  12. Amazon Polly: Text In, Life-like Speech Out Amazon Polly “The

    temperature in WA is 75°F” “The temperature in Washington is 75 degrees Fahrenheit”
  13. TEXT Market grew by > 20%. WORDS PHONEMES { {

    { { { ˈtwɛn.ti pɚ.ˈsɛnt ˈmɑɹ.kət ˈgɹu baɪ ˈmoʊɹ ˈðæn PROSODY CONTOUR UNIT SELECTION AND ADAPTATION TEXT PROCESSING PROSODY MODIFICATION STREAMING Market grew by more than twenty percent Speech units inventory
  14. Amazon ALEXA (It’s what’s inside Alexa) 3 Natural Language Understanding

    (NLU) & Automatic Speech Recognition (ASR) Powered By Deep Learning
  15. Amazon Lex: Speech Recognition & Natural Language Understanding Amazon Lex

    Automatic Speech Recognition Natural Language Understanding “What’s the weather forecast?” Weather Forecast
  16. Amazon Lex: Speech Recognition & Natural Language Understanding Amazon Lex

    Automatic Speech Recognition Natural Language Understanding “What’s the weather forecast?” “It will be sunny and 25°C” Weather Forecast
  17. Lex Bot Structure Utterances Spoken or typed phrases that invoke

    your intent BookHotel Intents An Intent performs an action in response to natural language user input Slots Slots are input data required to fulfill the intent Fulfillment Fulfillment mechanism for your intent
  18. Hotel Booking City New York City Check In Nov 30th

    Check Out Dec 2nd Hotel Booking City New York City Check In Check Out “Book a Hotel” Book Hotel NYC “Book a Hotel in NYC” Automatic Speech Recognition Hotel Booking New York City Natural Language Understanding Intent/Slot Model Utterances “Your hotel is booked for Nov 30th” Polly Confirmation: “Your hotel is booked for Nov 30th” a in “Can I go ahead with the booking?”
  19. Train model Evaluate and optimize Retrieve predictions Building smart applications

    with Amazon ML Create a datasource object pointing to your data Explore and understand your data Transform data and train your model 1 2 3
  20. Create a datasource object >>> import boto >>> ml =

    boto.connect_machinelearning() >>> ds = ml.create_data_source_from_s3( data_source_id = ’my_datasource', data_spec= { 'DataLocationS3':'s3://bucket/input/', 'DataSchemaLocationS3':'s3://bucket/input/.schema'}, compute_statistics = True)
  21. Train your model >>> import boto >>> ml = boto.connect_machinelearning()

    >>> model = ml.create_ml_model( ml_model_id=’my_model', ml_model_type='REGRESSION', training_data_source_id='my_datasource')
  22. Train model Evaluate and optimize Retrieve predictions Building smart applications

    with Amazon ML Understand model quality Adjust model interpretation 1 2 3
  23. Train model Evaluate and optimize Retrieve predictions Building smart applications

    with Amazon ML Batch predictions Real-time predictions 1 2 3
  24. Batch predictions Asynchronous, large-volume prediction generation Request through service console

    or API Best for applications that deal with batches of data records >>> import boto >>> ml = boto.connect_machinelearning() >>> model = ml.create_batch_prediction( batch_prediction_id = 'my_batch_prediction’ batch_prediction_data_source_id = ’my_datasource’ ml_model_id = ’my_model', output_uri = 's3://examplebucket/output/’)
  25. Real-time predictions Synchronous, low-latency, high-throughput prediction generation Request through service

    API or server or mobile SDKs Best for interaction applications that deal with individual data records >>> import boto >>> ml = boto.connect_machinelearning() >>> ml.predict( ml_model_id=’my_model', predict_endpoint=’example_endpoint’, record={’key1':’value1’, ’key2':’value2’}) { 'Prediction': { 'predictedValue': 13.284348, 'details': { 'Algorithm': 'SGD', 'PredictiveModelType': 'REGRESSION’ } } }
  26. Your Skill (Lambda function) Amazon Machine Learning get real-time predictions

    invoke Weather Forecast Historical Data get forecast build & train model
  27. I see… Amazon Rekognition Amazon Polly Camera Raspberry Pi Voice

    Synthesize Speech Detect Labels Detect Faces
  28. Nikola Tesla, 1926 “When wireless is perfectly applied, the whole

    earth will be converted into a huge brain…”