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

Introduction to AIML in the cloud

Introduction to AIML in the cloud

AWS met à la portée de tous les développeurs des technologies telles que la reconnaissance du langage naturel (NLP), la reconnaissance de la parole (ASR), la génération de voix (TTS). Les APIs AWS permettent de brancher facilement ces services dans des applications existantes. Dans cette session, Sébastien vous expliquera comment créer la prochaine génération d’applications intelligentes pour mieux interragir avec vos clients.

More Decks by Sébastien Stormacq - AWS Developer Advocate

Other Decks in Technology

Transcript

  1. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Machine Learning in the Cloud Sébastien Stormacq Developer Advocate, EMEA @sebsto
  2. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Put machine learning in the hands of every developer Our mission at
  3. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Our Approach for Machine Learning Customer-focused 90%+ of our ML roadmap is defined by customers Multi-framework Support for the most popular frameworks Pace of innovation 200+ new ML launches and major feature updates in the last year Breadth and depth A wide range of AI and ML services in- production Security and analytics Deep set of security and encryption features, with robust analytics capabilities Embedded R&D Customer-centric approach to advancing the state of the art
  4. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. M L F R A M E W O R K S & I N F R A S T R U C T U R E The Amazon ML Stack: Broadest & Deepest Set of Capabilities A I S E R V I C E S R E K O G N I T I O N I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D & C O M P R E H E N D M E D I C A L L E X R E K O G N I T I O N V I D E O Vision Speech Chatbots A M A Z O N S A G E M A K E R B U I L D T R A I N F O R E C A S T T E X T R A C T P E R S O N A L I Z E D E P L O Y Pre-built algorithms & notebooks Data labeling (G R O U N D T R U T H ) One-click model training & tuning Optimization (N E O ) One-click deployment & hosting M L S E R V I C E S F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e E C 2 P 3 & P 3 d n E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C I N F E R E N C E Reinforcement learning Algorithms & models ( A W S M A R K E T P L A C E F O R M A C H I N E L E A R N I N G ) Language Forecasting Recommendations
  5. Amazon SageMaker: Build, Train, and Deploy ML Models at Scale

    Collect and prepare training data Choose and optimize your ML algorithm Train and Tune ML Models Set up and manage environments for training Deploy models in production Scale and manage the production environment 1 2 3
  6. Machine learning cycle Business Problem ML problem framing Data collection

    Data integration Data preparation and cleaning Data visualization and analysis Feature engineering Model training and parameter tuning Model evaluation Monitoring and debugging Model deployment Predictions Are business goals met? YES NO Data augmentation Feature augmentation Re-training
  7. Manage data on AWS Business Problem ML problem framing Data

    collection Data integration Data preparation and cleaning Data visualization and analysis Feature engineering Model training and parameter tuning Model evaluation Monitoring and debugging Model deployment Predictions Are business goals met? YES NO Data augmentation Feature augmentation Re-training
  8. Build and train models using SageMaker Business Problem ML problem

    framing Data collection Data integration Data preparation and cleaning Data visualization and analysis Feature engineering Model training and parameter tuning Model evaluation Monitoring and debugging Model deployment Predictions Are business goals met? YES NO Data augmentation Feature augmentation Re-training
  9. Deploy models using SageMaker Business Problem ML problem framing Data

    collection Data integration Data preparation and cleaning Data visualization and analysis Feature engineering Model training and parameter tuning Model evaluation Monitoring and debugging Model deployment Predictions Are business goals met? YES NO Data augmentation Feature augmentation Re-training
  10. Amazon SageMaker Fully managed hosting with auto- scaling One-click deployment

    Pre-built notebooks for common problems Built-in, high- performance algorithms and frameworks One-click training Hyperparameter optimization Deploy Train Build Model compilation Elastic inference Inference pipelines P3DN, C5N TensorFlow on 256 GPUs Resume HPO tuning job New built-in algorithms scikit-learn environment Model marketplace Search Git integration Elastic inference
  11. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Working with Amazon SageMaker
  12. The Amazon SageMaker API • Python SDK orchestrating all Amazon

    SageMaker activity • High-level objects for algorithm selection, training, deploying, automatic model tuning, etc. • Spark SDK (Python & Scala) • AWS CLI: ‘aws sagemaker’ • AWS SDK: boto3, etc.
  13. Model Training (on EC2) Model Hosting (on EC2) Training data

    Model artifacts Training code Helper code Helper code Inference code Ground Truth Client application Inference code Training code Inference request Inference response Inference Endpoint
  14. Training code Factorization Machines Linear Learner Principal Component Analysis K-Means

    Clustering XGBoost And more Built-in Algorithms Bring Your Own Container Bring Your Own Script Model options
  15. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Built-in algorithms
  16. Built-in algorithms orange: supervised, yellow: unsupervised Linear Learner: regression, classification

    Image Classification: Deep Learning (ResNet) Factorization Machines: regression, classification, recommendation Object Detection (SSD): Deep Learning (VGG or ResNet) K-Nearest Neighbors: non-parametric regression and classification Neural Topic Model: topic modeling XGBoost: regression, classification, ranking https://github.com/dmlc/xgboost Latent Dirichlet Allocation: topic modeling (mostly) K-Means: clustering Blazing Text: GPU-based Word2Vec, and text classification Principal Component Analysis: dimensionality reduction Sequence to Sequence: machine translation, speech to text and more Random Cut Forest: anomaly detection DeepAR: time-series forecasting (RNN) Object2Vec: general-purpose embedding IP Insights: usage patterns for IP addresses Semantic Segmentation: Deep Learning
  17. Amazon SageMaker Fully managed hosting with auto- scaling One-click deployment

    Pre-built notebooks for common problems Built-in, high- performance algorithms and frameworks One-click training Hyperparameter optimization Build Train Deploy FREE TIER
  18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. Getting started http://aws.amazon.com/free https://ml.aws https://aws.amazon.com/sagemaker https://github.com/aws/sagemaker-python-sdk https://github.com/aws/sagemaker-spark https://github.com/awslabs/amazon-sagemaker-examples https://gitlab.com/juliensimon/ent321 https://medium.com/@julsimon https://gitlab.com/juliensimon/dlnotebooks
  19. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Rekognition – Image and Video Analysis
  20. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Optical Character Recognition (OCR)
  21. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Object & Scene Detection
  22. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Face Search/Comparison
  23. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Lex A service for building conversational interfaces into your applications using voice and text
  24. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Lex – Features Text and speech language understanding: powered by the same technology as Amazon Alexa Deployment to chat services (Web/Mobile Apps, Facebook, Kik, Slack, Twilio SMS) Designed for builders: efficient and intuitive tools to build conversations; scales automatically Versioning and alias support @
  25. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Lex Bots – key concepts 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
  26. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “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 Hotel Booking City New York City Check in Nov 30th Check out Dec 2nd “Your hotel is booked for Nov 30th” Amazon Polly Confirmation: “Your hotel is booked for Nov 30th” “Can I go ahead with the booking? a in
  27. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Utterances I’d like to book a hotel I want to make my hotel reservations I want to book a hotel in New York City Can you help me book my hotel?
  28. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Slots Destination City New York City, Seattle, London … Slot Type Values Check in Date Valid dates Check out Date Valid dates
  29. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Slot elicitation I’d like to book a hotel What date do you check in? New York City Sure, what city do you want to book? Nov 30th Check in 11/30/2017 City New York City
  30. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Connect Self-service, cloud-based contact center service Real time and historical analytics High-quality voice capability Call recording Skills-based routing [Automatic Call Distribution (ACD)]
  31. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Intelligent call center chatbot Amazon Connect Customer Amazon Lex Lambda: Fulfillment DynamoDB: Customer Data SNS: SMS Messaging Customer calls Connect to reschedule an appointment Connect calls Lex chatbot Lex chatbot calls Lambda function to get customer preferences and fulfil Intents Lambda function sends text message confirmation via SNS Customer receives appointment confirmation text message Lambda function writes updates to DynamoDB
  32. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Turn text into lifelike speech using deep learning
  33. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Polly • Content creation • Mobile & desktop applications • Internet of Things (IoT) • Education & e-learning • Telephony • Game development Use cases • 58 voices across 28 languages • Lip-syncing & text highlighting • Fine-grained voice control • Custom vocabularies • Available in 18 AWS Regions Key features
  34. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Polly “Hi, my name is Steve…” Text-to-speech (TTS)
  35. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Synthesize Speech API $ aws polly synthesize-speech --text "hello" --voice-id Matthew --output-format mp3 [--lexicon-names mylex1 mylex2] output.mp3 { "ContentType": "audio/mpeg", "RequestCharacters": "11" }
  36. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “With Amazon Polly our users benefit from the most lifelike Text-to-Speech voices available on the market.” Severin Hacker CTO, Duolingo
  37. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Turn speech into text
  38. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “Hello, this is Allan speaking” Amazon Transcribe Speech-to-text (STT)
  39. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. English Italian French Spanish Portuguese Supported languages * * more languages coming soon!
  40. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ringDNA End-to-end communications platform for sales teams Enterprise organizations use RingDNA to dramatically increase productivity, engage in smarter sales conversations, gain predictive sales insights and improve their win rate Speech to Text "A critical component of RingDNA’s Conversation AI requires best of breed speech-to-text to deliver transcriptions of every phone call. RingDNA is excited about Amazon Transcribe since it provides high-quality speech recognition at scale, helping us to better transcribe every call to text " Howard Brown, CEO & Founder, RingDNA https://www.youtube.com/watch?v=1ZJ_f1bDdog
  41. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. How do you extract insights from unstructured text?
  42. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Comprehend A fully managed and continuously trained service that helps you extract insights from unstructured text
  43. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Comprehend Sentiment Entities Languages Keyphrases Topic modeling Syntax
  44. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Comprehend – Natural Language Processing Amazon.com, Inc. is located in Seattle, WA and was founded July 5, 1994 by Jeff Bezos. Our customers love buying everything from books to blenders at great prices Named Entities Amazon.com: Organization Seattle, WA : Location July 5th,1994: Date Jeff Bezos : Person Keyphrases Our customers books blenders great prices Sentiment Positive Language English
  45. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Comprehend – Syntax API Our customers love buying everything from books to blenders at great prices Token (word) Part of Speech customers Noun love Verb books Noun great Adjective prices Noun
  46. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Supported parts of speech ADJ – Adjective ADP – Adposition ADV – Adverb AUX – Auxiliary CCONJ – Coordinating Conjunction DET – Determiner INTJ - Interjection NOUN - Noun NUM – Numeral O – Other PART – Particle PRON – Pronoun PROPN – Proper Noun PUNCT – Punctuation SCONJ – Subordinating Conjunction SYM – Symbol VERB – Verb
  47. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Syntax detection $ aws comprehend detect-syntax --language-code 'en' --text 'I love cloud!’ { "SyntaxTokens": [ { "TokenId": 1, "Text": "I", "BeginOffset": 0, "EndOffset": 1, "PartOfSpeech": { "Tag": "PRON", "Score": 0.9999802112579346 } }, ...
  48. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Sentiment Analysis $ aws comprehend detect-sentiment --language-code 'en' --text 'I love cloud!’ { "Sentiment": "POSITIVE”, "SentimentScore": { "Mixed": 0.012617903761565685, "Positive": 0.9599817991256714, "Neutral": 0.021758323535323143, "Negative": 0.005641999188810587 } }
  49. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Popular text analytics use cases Content Personalization • Understand related documents based on entities, phrases or even topic similarities for trends analysis, to drive content personalization and recommendations Semantic Search • Index entities for boosting and ranking search results Intelligent data warehouse • Query unstructured data in relational databases, processing data within the data lake (Amazon S3) and then inserting it back into the data warehouse Social Analytics • Ingest, process and analyze trends from entities and sentiment from social media posts across Twitter and Facebook
  50. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Support for large data sets and topic modeling STORM WORLD SERIES STOCK MARKET WASHINGTON LIBRARY OF NEWS ARTICLES * Amazon Comprehend
  51. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Extract information from unstructured medical text accurately and quickly No machine learning experience required Amazon Comprehend Medical
  52. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Yes, natural language translation J
  53. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Supported languages * Arabic Simplified Chinese French German Spanish Portuguese Japanese Traditional Chinese Italian Russian Turkish Czech * 417 translation combinations Danish Dutch Finnish Swedish Polish Hebrew
  54. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. «We operate 90 localized websites in 41 languages. (…) Having evaluated Amazon Translate and several other solutions, we believe that Amazon Translate presents a quick, efficient and most importantly, accurate solution. » Matt Fryer, VP and Chief Data Science Officer, Hotels.com
  55. Thank you! © 2019, Amazon Web Services, Inc. or its

    affiliates. All rights reserved. Sébastien Stormacq Developer Advocate, EMEA @sebsto