O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Practical Deep Learning for Cloud and Mobile

Book Description

Whether you’re a software engineer aspiring to enter the world of artificial intelligence, a veteran data scientist, or a hobbyist with a simple dream of making the next viral AI app, you might have wondered where do I begin? This step-by-step guide teaches you how to build practical applications using deep neural networks for the cloud and mobile using a hands-on approach.

Relying on years of industry experience transforming deep learning research into award-winning applications, Anirudh Koul, Siddha Ganju, and Meher Kasam guide you through the process of converting an idea into something that people can use in the real world. Train, optimize, and deploy computer vision models with Keras, TensorFlow, CoreML, TensorFlow Lite, and MLKit, rapidly taking your system from zero to production quality.

  • Develop AI applications for the desktop, cloud, smartphones, browser, and smart robots using Raspberry Pi, Jetson Nano, and Google Coral
  • Perform Object Classification, Detection, Segmentation in real-time
  • Learn by building examples such as Silicon Valley’s "Not Hotdog" app, image search engines, and Snapchat filters
  • Train an autonomous car in a video game environment and then build a real mini version
  • Use transfer learning to train models in minutes
  • Generate photos from sketches in your browser with Generative Adversarial Networks (GANs with pix2pix), and Body Pose Estimation (PoseNet)
  • Discover 50+ practical tips for data collection, model interoperability, debugging, avoiding bias, and scaling to millions of users

Table of Contents

  1. 1. Image Classification with Keras
    1. Introduction to Keras
      1. Layers of Abstraction
    2. Keras in Practice
      1. Predicting an Image’s Category
    3. Analysis
      1. A Model Zoo in Keras
      2. What Does My Neural Network Think?
    4. Summary
  2. 2. Cats vs Dogs - Transfer Learning in 30 lines with Keras
    1. Transfer Learning
      1. Understanding Different Layers in a CNN in the Context of Transfer Learning
    2. Building a Custom Classifier in Keras with Transfer Learning
      1. Organize the data
      2. Set up the Configuration
      3. Data Augmentation
      4. Model Definition
      5. Train and Test
      6. Test the Model
    3. Analyzing the results
    4. Summary
  3. 3. Building a Reverse Image Search Engine
    1. What is Image Similarity?
    2. Feature Extraction
    3. Similarity search
      1. Visualizing Image Clusters with t-SNE
      2. Improving the speed of feature extraction and similarity search
      3. Improving accuracy with Fine-Tuning?
    4. Case studies
      1. Flickr
      2. Pinterest
    5. SUMMARY
  4. 4. 15 Minutes to Fame: Up and Running with Cloud APIs
    1. Visual Recognition APIs: An Overview
      1. Clarifai
      2. Microsoft Cognitive Services
      3. Google Cloud Vision
      4. Amazon Rekognition
      5. IBM Watson Visual Recognition
      6. Algorithmia
    2. Visual Recognition APIs: A Comparison
      1. Service Offerings
      2. Cost
      3. Accuracy
    3. Get Up and Running with Cloud APIs
    4. Train your Own Classifier
      1. Top reasons why your classifier does not work satisfactorily
    5. Performance Tuning
      1. Resizing
      2. Compression
    6. Case Studies: Cloud APIs used across Industries
      1. Uber
      2. Giphy
      3. OmniEarth
      4. Photobucket
      5. Staples
      6. InDro Robotics
    7. Summary
  5. 5. Building our own Image recognition Cloud API with TensorFlow Serving
    1. Making a REST API with Flask
      1. Deploying a Keras Model to Flask
    2. Google Cloud ML Engine
    3. TensorFlow Serving
      1. Why use TensorFlow Serving?
      2. Installation
    4. Cost Analysis
    5. Case Studies
      1. Uber - Horovod and Michelangelo
      2. Zendesk
      3. Facebook’s FBLearner Flow
      4. Coca-Cola
    6. Summary
  6. 6. Real-time Object Recognition on 1000 objects with Keras & CoreML
    1. Introduction to CoreML
      1. API Frameworks from Apple
    2. Building a Real-Time Object Recognition app
    3. Conversion to CoreML
      1. Conversion from Keras
      2. Conversion from Caffe
      3. Conversion from TensorFlow
    4. Dynamic Model Deployment
    5. Limitations of CoreML
    6. Understanding Performance and Resource Tradeoffs with Various Machine Learning Models
      1. Benchmarking Models on iPhones
      2. Measuring Energy Impact
      3. Benchmarking Load
    7. Case Studies
      1. Magic Sudoku
      2. Seeing AI
    8. Summary
  7. 7. Not Hotdog with Keras & CoreML
    1. Data collection
      1. Approach 1: Find or collect a dataset
      2. Approach 2: Fatkun Chrome browser extension
      3. Approach 3: Web scraper using Bing Image Search API
    2. Training mechanism
      1. Approach 1: Using GUI-based tools
      2. Approach 2: Fine-tune using Keras
    3. Model Conversion with coremltools
    4. Building the iOS App
    5. Summary
  8. 8. Deep Learning and Self-Driving Cars
    1. Deep Learning, Autonomous Driving and the Data Problem
    2. The “Hello, World!” of Self-Driving Cars
      1. Setup and requirements
    3. Data Exploration and Preparation
      1. Identifying the region of interest (ROI)
      2. Data augmentation
      3. Dataset imbalance and driving strategies
    4. Training the Autonomous Driving Model
      1. Drive Data Generator
      2. Model Definition
    5. Deploying the Autonomous Driving Model
    6. Summary