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

The Bleeding Edge: Great Machine Learning Exper...

The Bleeding Edge: Great Machine Learning Experiences In Your App With Cloud Functions & Firebase

Otemuyiwa Prosper

June 17, 2017
Tweet

More Decks by Otemuyiwa Prosper

Other Decks in Programming

Transcript

  1. GREAT MACHINE LEARNING EXPERIENCES IN YOUR APP WITH CLOUD FUNCTIONS

    & FIREBASE PROSPER OTEMUYIWA - @unicodeveloper
  2. Speaker Bio Google I/O Extended 2017 3 ❖ Software Developer

    ❖ Consultant at Auth0 ❖ Open Sourcerer ❖ Self-Acclaimed Developer Evangelist ❖ Community Builder ❖ Jollof Rice Ambassador ❖ Google Developer Expert ❖ Sublime Text Advocate @unicodeveloper
  3. What is Machine Learning? Google I/O Extended 2017 z 5

    Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed.
  4. Machine Learning Experiences - Cloud Vision API Google I/O Extended

    2017 15 Automatically detect objects in images
  5. Machine Learning Experiences - Cloud Speech API Google I/O Extended

    2017 23 Google Cloud Speech API enables developers to convert audio to text by applying powerful neural network models in an easy to use API. The API recognizes over 80 languages and variants, to support your global user base
  6. Machine Learning Experiences - Cloud Translation API Google I/O Extended

    2017 26 Cloud Translation API provides a simple programmatic interface for translating an arbitrary string into any supported language using state-of-the-art Neural Machine Translation.
  7. Cloud Functions For Firebase Google I/O Extended 2017 30 Write

    Custom Server Code on Google Servers In response to events happening in your apps.
  8. Cloud Functions For Firebase Google I/O Extended 2017 34 What

    Triggers Are Available? ❖ Realtime Database Triggers ❖ Firebase Authentication Triggers ❖ Google Analytics for Firebase Triggers ❖ Cloud Storage Triggers ❖ Cloud Pub/Sub Triggers ❖ HTTP Triggers
  9. Practical Use Cases Of Cloud Functions Google I/O Extended 2017

    40 Content Moderation ❖ Text Moderation
  10. Practical Use Cases Of Cloud Functions Google I/O Extended 2017

    43 Content Moderation ❖ Image Moderation ❖ By nature, needs to be performed in a trusted environment.
  11. Practical Use Cases Of Cloud Functions Google I/O Extended 2017

    44 Content Moderation - Image ❖ Image Moderation ❖ By nature, needs to be performed in a trusted environment.
  12. You can actually avoid that in your apps. ML &

    Cloud Functions to the Rescue #BeWiseSon #BeWiseWoman
  13. Practical Use Cases Of Cloud Functions Google I/O Extended 2017

    48 exports.blurOffensiveImages = functions.storage.object().onChange(event => { const object = event.data; const file = gcs.bucket(object.bucket).file(object.name); // Exit if this is a move or deletion event. if (object.resourceState === 'not_exists') { return console.log('This is a deletion event.'); } // Check the image content using the Cloud Vision API. return vision.detectSafeSearch(file).then(data => { const safeSearch = data[0]; console.log('SafeSearch results on image', safeSearch); if (safeSearch.adult || safeSearch.violence) { return blurImage(object.name, object.bucket, object.metadata); } }); });
  14. Practical Use Cases Of Cloud Functions Google I/O Extended 2017

    49 To blur the image stored in Cloud Storage, we'll first download it locally on the Cloud Functions instance, blur the image with ImageMagick, which is installed by default on all instances, then re-upload the image to Cloud Storage:
  15. Learning Resources for Cloud Functions & Firebase Google I/O Extended

    2017 52 Cloud Functions Docs - http://bit.ly/2qiq3F9
  16. Collection of Sample Apps for Cloud Functions? The CakePHP 2017

    Conference 53 ❖ Email Confirmation ❖ Delete unused Accounts ❖ Github to Slack ❖ Thumbnail Generation ❖ User data cleanup ❖ Extract Image Metadata Github Functions Samples - http://bit.ly/2sDT56x