Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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. An Introduction to
    Amazon AI Services
    Danilo Poccia
    @danilop danilop
    AWS Technical Evangelist

    View Slide

  2. 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

    View Slide

  3. 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

    View Slide

  4. 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

    View Slide

  5. Artificial Intelligence on AWS
    P2 / FPGA / Elastic GPUs Deep Learning
    AMI and template
    Investment in
    Apache MXNet

    View Slide

  6. 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

    View Slide

  7. 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

    View Slide

  8. Elastic GPUs For EC2:
    GPU Acceleration For Graphics Workloads
    1GiB
    GPU Memory
    2 GiB
    4 GiB
    8 GiB
    Current
    Generation
    EC2
    Instance

    View Slide

  9. 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

    View Slide

  10. Apache MXNet

    View Slide

  11. 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

    View Slide

  12. Apache Spark MLlib

    View Slide

  13. Amazon AI
    Bringing Powerful Artificial Intelligence To All Developers

    View Slide

  14. Amazon Rekognition
    Image Recognition And Analysis
    Powered By Deep Learning
    1

    View Slide

  15. Amazon Rekognition: Images In,
    Categories and Facial Analysis Out
    Amazon
    Rekognition
    Car
    Outside
    Daytime
    Driving
    Objects
    & Scenes
    Female
    Smiling
    Sunglasses
    Faces

    View Slide

  16. Deep Learning Process
    Conv 1 Conv 2 Conv n


    Feature Maps
    Labrador
    Dog
    Beach
    Outdoors
    Softmax
    Probability
    Fully
    Connected
    Layer

    View Slide


  17. Amazon Rekognition

    View Slide

  18. Amazon Polly
    Text To Speech Powered By Deep Learning
    2

    View Slide

  19. 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”

    View Slide

  20. 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

    View Slide


  21. Amazon Polly

    View Slide

  22. Amazon ALEXA
    (It’s what’s inside Alexa)
    3
    Natural Language Understanding (NLU) &
    Automatic Speech Recognition (ASR) Powered By Deep Learning

    View Slide

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

    View Slide

  24. 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

    View Slide

  25. 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

    View Slide

  26. 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?”

    View Slide

  27. View Slide


  28. Amazon Lex

    View Slide

  29. Amazon Machine Learning
    Create ML models without having to learn
    complex algorithms and technology
    4

    View Slide

  30. Train
    model
    Evaluate and
    optimize
    Retrieve
    predictions
    Building smart applications with Amazon ML
    1 2 3

    View Slide

  31. 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

    View Slide

  32. 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)

    View Slide

  33. Explore and understand your data

    View Slide

  34. 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')

    View Slide

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

    View Slide

  36. Explore model quality

    View Slide

  37. Fine-tune model interpretation

    View Slide

  38. Fine-tune model interpretation

    View Slide

  39. Train
    model
    Evaluate and
    optimize
    Retrieve
    predictions
    Building smart applications with Amazon ML
    Batch predictions
    Real-time predictions
    1 2 3

    View Slide

  40. 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/’)

    View Slide

  41. 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’
    }
    }
    }

    View Slide


  42. Bike Sharing

    View Slide

  43. View Slide

  44. All Users
    Casual Users
    Registered Users

    View Slide

  45. Your Skill
    (Lambda function)
    Amazon
    Machine Learning
    get real-time predictions
    invoke
    Weather
    Forecast
    Historical Data
    get forecast
    build & train model

    View Slide


  46. I See

    View Slide

  47. I see…
    Amazon
    Rekognition
    Amazon
    Polly
    Camera
    Raspberry Pi
    Voice
    Synthesize
    Speech
    Detect Labels
    Detect Faces

    View Slide

  48. View Slide

  49. Nikola Tesla, 1926
    “When wireless is perfectly
    applied, the whole earth will be
    converted into a huge brain…”

    View Slide

  50. An Introduction to
    Amazon AI Services
    Danilo Poccia
    @danilop danilop
    AWS Technical Evangelist

    View Slide