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

Machines are Learning: Bringing Powerful Artificial Intelligence to All Developers

Machines are Learning: Bringing Powerful Artificial Intelligence to All Developers

Codemotion, Milan, November 10th, 2017

Have you always wanted to add predictive capabilities, image or voice recognition to your application, but haven’t been able to find the time or the right technology to get started? Everybody wants to build smart apps, but only a few are Data Scientists. This session will help you understand machine learning terminology & challenges, what deep learning is and the possible use cases, how to build a machine learning model that works, and how to use developer-ready APIs for high-quality, high-accuracy AI capabilities that are scalable and cost-effective.

Danilo Poccia

November 10, 2017
Tweet

More Decks by Danilo Poccia

Other Decks in Programming

Transcript

  1. Machines are Learning
    Danilo Poccia, AWS Technical Evangelist
    CODEMOTION MILAN - SPECIAL EDITION
    10 – 11 NOVEMBER 2017

    View Slide

  2. Machines are Learning
    Bringing Powerful Artificial Intelligence to All Developers
    Danilo Poccia
    AWS Technical Evangelist
    @danilop [email protected]
    danilop

    View Slide

  3. Credit: Gerry Cranham/Fox Photos/Getty Images
    http://www.telegraph.co.uk/travel/destinations/europe/united-kingdom/england/london/galleries/The-history-of-the-Tube-in-pictures-150-years-of-London-Underground/1939-ticket-examin/

    View Slide

  4. 1939 London Underground
    Credit: Gerry Cranham/Fox Photos/Getty Images
    http://www.telegraph.co.uk/travel/destinations/europe/united-kingdom/england/london/galleries/The-history-of-the-Tube-in-pictures-150-years-of-London-Underground/1939-ticket-examin/

    View Slide

  5. Data Predictions

    View Slide

  6. Data Model Predictions

    View Slide

  7. Model

    View Slide

  8. http://www.thehudsonvalley.com/articles/60-years-ago-today-local-technology-demonstrated-artificial-intelligence-for-the-first-time
    1959 Arthur Samuel

    View Slide

  9. Machine Learning

    View Slide

  10. Machine Learning
    Supervised
    Learning
    Inferring a model
    from labeled
    training data

    View Slide

  11. Machine Learning
    Supervised
    Learning
    Unsupervised
    Learning
    Inferring a model
    from labeled
    training data
    Inferring a model
    to describe hidden
    structure from
    unlabeled data

    View Slide

  12. Reinforcement
    Learning
    Perform a certain
    goal in a
    dynamic
    environment
    Machine Learning
    Supervised
    Learning
    Unsupervised
    Learning

    View Slide

  13. Driving a vehicle
    Playing a game
    against an opponent

    View Slide

  14. Clustering

    View Slide

  15. Clustering

    View Slide

  16. Tip: Try topic modeling with your own emails ;-)
    Topic Modeling
    Discovering abstract “topics”
    that occur in a collection of documents
    For example, looking for “infrequent” words
    that are used more often in a document

    View Slide

  17. Regression “How many bikes will
    be rented tomorrow?”
    Happy, Sad, Angry,
    Confused, Disgusted,
    Surprised, Calm,
    Unknown
    Binary
    Classification
    Multi-Class
    Classification
    “Is this email spam?”
    “What is the
    sentiment of this
    tweet, or of this social
    media comment?”
    1, 0, 100K
    Yes / No
    True / False
    %

    View Slide

  18. Training the Model
    Minimizing the Error
    of using the Model on the Labeled Data

    View Slide

  19. Validation
    How well is this Model working on New Data?

    View Slide

  20. Be Careful of Overfitting

    View Slide

  21. Be Careful of Overfitting

    View Slide

  22. Be Careful of Overfitting

    View Slide

  23. Better Fitting

    View Slide

  24. Better Fitting

    View Slide

  25. Different Models ⇒ Different Predictions

    View Slide

  26. Labeled Data

    View Slide

  27. Labeled Data
    70%
    30%
    Training
    Validation

    View Slide

  28. Neural
    Networks

    View Slide

  29. 1943 Warren McCulloch, Walter Pitts
    Threshold
    Logic
    Units

    View Slide

  30. 1962 Frank Rosenblatt
    Perceptron

    View Slide


  31. w1
    w2
    w3
    wn
    w0
    =
    output
    weights
    (parameters)
    activation
    function
    input

    View Slide

  32. f(∑)
    w1
    w2
    w3
    wn
    w0
    =
    weights
    (parameters)
    activation
    function
    output
    input

    View Slide

  33. f(∑)
    input output

    View Slide

  34. 1969 Marvin Minsky, Seymour Papert
    Perceptrons:
    An Introduction
    to Computational Geometry
    A perceptron can only solve
    linearly separable functions
    (e.g. no XOR)

    View Slide

  35. f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    input
    layer
    hidden
    layer
    output
    layer
    input output
    Multiple Layers
    Lots of Parameters
    Backpropagation

    View Slide

  36. Microprocessor Transistor Counts 1971-2011
    Intel Xeon CPU
    28 cores
    NVIDIA V100 GPU
    5,120 CUDA Cores
    640 Tensor Cores
    https://en.wikipedia.org/wiki/Moore's_law

    View Slide

  37. LeCun, Gradient-Based
    Learning Applied to Document
    Recognition,1998
    Hinton, A Fast Learning
    Algorithm for Deep Belief
    Nets, 2006
    Bengio, Learning Deep
    Architectures for AI, 2009
    Advances in Research 1998-2009

    View Slide

  38. “Stacks of differentiable
    non-linear functions
    with lots of parameters
    solve nearly any predictive
    modeling problem”
    —Jeremy Howard, fast.ai

    View Slide

  39. Image
    Processing

    View Slide

  40. f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    f(∑)
    output
    How to give images in input
    to a Neural Network?
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View Slide

  41. Convolution Matrix
    0 0 0
    0 1 0
    0 0 0
    Identity
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View Slide

  42. Convolution Matrix
    1 0 -1
    2 0 -2
    1 0 -1
    Left Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View Slide

  43. Convolution Matrix
    -1 0 1
    -2 0 2
    -1 0 1
    Right Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View Slide

  44. Convolution Matrix
    1 2 1
    0 0 0
    -1 -2 -1
    Top Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View Slide

  45. Convolution Matrix
    -1 -2 -1
    0 0 0
    1 2 1
    Bottom Edges
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View Slide

  46. Convolution Matrix
    0.6 -0.6 1.2
    -1.4 1.2 -1.6
    0.8 -1.4 1.6
    Random Values
    Photo by David Iliff. License: CC-BY-SA 3.0
    https://commons.wikimedia.org/wiki/File:Colosseum_in_Rome,_Italy_-_April_2007.jpg

    View Slide

  47. Convolutional Neural Networks (CNNs)
    https://en.wikipedia.org/wiki/Convolutional_neural_network

    View Slide

  48. ImageNet Classification Error Over Time
    0
    5
    10
    15
    20
    25
    30
    2010 2011 2012 2013 2014 2015 2016 2017
    Classification Error
    CNNs

    View Slide

  49. 2012 ImageNet Classification with Deep Convolutional Neural Networks

    View Slide

  50. SuperVision: 8 layers, 60M parameters
    0

    View Slide

  51. 2013 Visualizing and Understanding Convolutional Networks

    View Slide

  52. View Slide

  53. View Slide

  54. How Do Neural Networks Learn?
    ?
    More generic and can be reused
    as feature extractor for other visual tasks
    Specific
    to task
    Cat
    Dog
    0

    View Slide

  55. The Challenge For Machine Learning: Scale
    Aggressive migration
    New data created on AWS
    PBs of existing data
    Data

    View Slide

  56. The Challenge For Machine Learning: Scale
    Tons of GPUs
    Elastic capacity
    Pre-built images
    Aggressive migration
    New data created on AWS
    PBs of existing data
    Data Training

    View Slide

  57. The Challenge For Machine Learning: Scale
    Tons of GPUs and CPUs
    Serverless
    At the edge, on IoT Devices
    Tons of GPUs
    Elastic capacity
    Pre-built images
    Aggressive migration
    New data created on AWS
    PBs of existing data
    Data Training Prediction

    View Slide

  58. Natural Language Processing Experiment: Topic Modeling
    EC2 Spot Instances
    1.1 Million vCPUs

    View Slide

  59. Fulfilment & logistics Search & discovery Existing products New products
    Thousands Of Amazon Engineers Focused On Machine Learning

    View Slide

  60. View Slide

  61. View Slide

  62. Machine Learning On AWS Today

    View Slide

  63. Artificial Intelligence In The Hands Of Every Developer
    S E R V I C E S
    P L A T F O R M S
    E N G I N E S
    I N F R A S T R U C T U R E
    GPU CPU IoT Mobile
    Apache MXNet Caffe 2 Theano PyTorch CNTK
    TensorFlow

    View Slide

  64. Early Detection
    Of Diabetic
    Complications

    View Slide

  65. FDA-approved
    Medical Imaging

    View Slide

  66. Sports Analytics

    View Slide

  67. Autonomous Driving Systems

    View Slide

  68. Real Time, Per Pixel Object Segmentation

    View Slide

  69. Centimeter-accurate Positioning

    View Slide

  70. Computation Knowledge Engine

    View Slide

  71. View Slide

  72. S E R V I C E S
    P L A T F O R M S
    E N G I N E S
    I N F R A S T R U C T U R E
    Amazon ML Spark & EMR Kinesis Batch ECS
    GPU CPU IoT Mobile
    Apache MXNet Caffe 2 Theano PyTorch CNTK
    TensorFlow
    Artificial Intelligence In The Hands Of Every Developer

    View Slide

  73. S E R V I C E S
    P L A T F O R M S
    Vision
    Amazon Rekognition
    E N G I N E S
    I N F R A S T R U C T U R E
    Amazon ML Spark & EMR Kinesis Batch ECS
    GPU CPU IoT Mobile
    Apache MXNet Caffe 2 Theano PyTorch CNTK
    TensorFlow
    Artificial Intelligence In The Hands Of Every Developer

    View Slide

  74. Mona Lisa
    (Leonardo da Vinci)

    View Slide

  75. View Slide

  76. View Slide

  77. View Slide

  78. Mona Lisa
    (Prado's version)

    View Slide

  79. Portrait of
    Maddalena Doni
    (Raphael)

    View Slide

  80. Bynder allows you to easily create, find and use content
    for branding automation and marketing solutions.
    With our new AI capabilities,
    Bynder’s software… now allows
    users to save hours of admin
    labor when uploading and
    organizing their files, adding
    exponentially more value.
    Chris Hall
    CEO, Bynder


    With Rekognition, Bynder revolutionizes marketing admin tasks with AI capabilities

    View Slide

  81. S E R V I C E S
    P L A T F O R M S
    Speech
    Amazon Polly
    Vision
    Amazon Rekognition
    E N G I N E S
    I N F R A S T R U C T U R E
    Amazon ML Spark & EMR Kinesis Batch ECS
    GPU CPU IoT Mobile
    Apache MXNet Caffe 2 Theano PyTorch CNTK
    TensorFlow
    Artificial Intelligence In The Hands Of Every Developer

    View Slide

  82. Generate Lifelike Speech With Amazon Polly
    24 languages
    “The temperature in
    Milanis 16 degrees
    Celsius”
    “The temperature
    in Milan is 16˚C”
    Amazon
    Polly
    50 voices

    View Slide

  83. aws polly synthesize-speech
    --text "It was nice to live such a wonderful live show."
    --output-format mp3
    --voice-id Joanna
    --text-type text
    output.mp3

    View Slide

  84. “Nel mezzo del cammin di nostra vita
    mi ritrovai per una selva oscura
    ché la diritta via era smarrita.”
    https://commons.wikimedia.org/wiki/File:Portrait_de_Dante.jpg

    View Slide

  85. Duolingo voices its language learning service Using Polly
    Duolingo is a free language learning service where users
    help translate the web and rate translations.
    With Amazon Polly our users
    benefit from the most lifelike
    Text-to-Speech voices
    available on the market.
    Severin Hacker
    CTO, Duolingo

    “ • Spoken language crucial for
    language learning
    • Accurate pronunciation matters
    • Faster iteration thanks to TTS
    • As good as natural human speech

    View Slide



  86. Royal National Institute of Blind People creates and
    distributes accessible information in the form of
    synthesized content
    Amazon Polly delivers
    incredibly lifelike voices which
    captivate and engage our
    readers.
    John Worsfold
    Solutions Implementation Manager, RNIB
    • RNIB delivers largest library of
    audiobooks in the UK for nearly 2 million
    people with sight loss
    • Naturalness of generated speech is
    critical to captivate and engage readers
    • No restrictions on speech redistributions
    enables RNIB to create and distribute
    accessible information in a form of
    synthesized content
    RNIB provides the largest library in the UK for people with sight loss

    View Slide

  87. S E R V I C E S
    P L A T F O R M S
    Chat
    Amazon Lex
    Speech
    Amazon Polly
    Vision
    Amazon Rekognition
    E N G I N E S
    I N F R A S T R U C T U R E
    Amazon ML Spark & EMR Kinesis Batch ECS
    GPU CPU IoT Mobile
    Apache MXNet Caffe 2 Theano PyTorch CNTK
    TensorFlow
    Artificial Intelligence In The Hands Of Every Developer

    View Slide

  88. Amazon Lex
    Speech recognition and natural language understanding
    Automatic speech recognition
    Natural language understanding
    “What’s the weather
    forecast?”
    Weather
    forecast
    Amazon Lex

    View Slide

  89. Amazon Lex
    Speech recognition and natural language understanding
    “It will be
    sunny
    and 16C”
    Automatic speech recognition
    Natural language understanding
    “What’s the weather
    forecast?”
    Weather
    forecast
    Amazon Lex

    View Slide

  90. “It will be sunny
    and 16 degrees
    Celsius”
    Amazon Polly
    Amazon Lex
    “It will be
    sunny
    and 16C”
    Automatic speech recognition
    Natural language understanding
    “What’s the weather
    forecast?”
    Weather
    forecast
    Speech recognition and natural language understanding
    Amazon Lex

    View Slide



  91. Finding missing persons:
    ~100,000 active missing
    persons cases in the U.S.
    at any given time
    ~60% are adults,
    ~40% are children
    • Motorola Solutions applies Amazon
    Rekognition, Amazon Polly and Amazon
    Lex
    • Image analytics and facial recognition
    can continually monitor for missing
    persons
    • Tools that understand natural language
    can enable officers to keep eyes up and
    hands free
    Motorola Solutions is using AI to help finding missing persons
    Motorola Solutions keeps utility workers connected and
    visible to each other with real-time voice and data
    communication across the smart grid.

    View Slide

  92. S E R V I C E S
    P L A T F O R M S
    Chat
    Amazon Lex
    Speech
    Amazon Polly
    Vision
    Amazon Rekognition
    E N G I N E S
    I N F R A S T R U C T U R E
    Amazon ML Spark & EMR Kinesis Batch ECS
    GPU CPU IoT Mobile
    Apache MXNet Caffe 2 Theano PyTorch CNTK
    TensorFlow

    View Slide

  93. There’s Never Been A Better Time To Build Smart Apps

    View Slide

  94. https://github.com/danilop/security-camera

    View Slide

  95. Machines are Learning
    Bringing Powerful Artificial Intelligence to All Developers
    Danilo Poccia
    AWS Technical Evangelist
    @danilop [email protected]
    danilop

    View Slide