Mobile Artificial Intelligence Projects

Book Description

Learn to build end-to-end AI apps from scratch for Android and iOS using TensorFlow Lite, CoreML, and PyTorch

Key Features

  • Build practical, real-world AI projects on Android and iOS
  • Implement tasks such as recognizing handwritten digits, sentiment analysis, and more
  • Explore the core functions of machine learning, deep learning, and mobile vision

Book Description

We're witnessing a revolution in Artificial Intelligence, thanks to breakthroughs in deep learning. Mobile Artificial Intelligence Projects empowers you to take part in this revolution by applying Artificial Intelligence (AI) techniques to design applications for natural language processing (NLP), robotics, and computer vision.

This book teaches you to harness the power of AI in mobile applications along with learning the core functions of NLP, neural networks, deep learning, and mobile vision. It features a range of projects, covering tasks such as real-estate price prediction, recognizing hand-written digits, predicting car damage, and sentiment analysis. You will learn to utilize NLP and machine learning algorithms to make applications more predictive, proactive, and capable of making autonomous decisions with less human input. In the concluding chapters, you will work with popular libraries, such as TensorFlow Lite, CoreML, and PyTorch across Android and iOS platforms.

By the end of this book, you will have developed exciting and more intuitive mobile applications that deliver a customized and more personalized experience to users.

What you will learn

  • Explore the concepts and fundamentals of AI, deep learning, and neural networks
  • Implement use cases for machine vision and natural language processing
  • Build an ML model to predict car damage using TensorFlow
  • Deploy TensorFlow on mobile to convert speech to text
  • Implement GAN to recognize hand-written digits
  • Develop end-to-end mobile applications that use AI principles
  • Work with popular libraries, such as TensorFlow Lite, CoreML, and PyTorch

Who this book is for

Mobile Artificial Intelligence Projects is for machine learning professionals, deep learning engineers, AI engineers, and software engineers who want to integrate AI technology into mobile-based platforms and applications. Sound knowledge of machine learning and experience with any programming language is all you need to get started with this book.

Publisher Resources

Download Example Code

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Mobile Artificial Intelligence Projects
  3. Dedication
  4. About Packt
    1. Why subscribe?
    2. Packt.com
  5. Contributors
    1. About the authors
    2. About the reviewers
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  7. Artificial Intelligence Concepts and Fundamentals
    1. AI versus machine learning versus deep learning
    2. Evolution of AI
    3. The mechanics behind ANNs
      1. Biological neurons
      2. Working of artificial neurons
        1. Scenario 1
        2. Scenario 2
        3. Scenario 3
      3. ANNs
      4. Activation functions
        1. Sigmoid function
        2. Tanh function
        3. ReLU function 
      5. Cost functions
        1. Mean squared error
        2. Cross entropy
      6. Gradient descent
      7. Backpropagation – a method for neural networks to learn
      8. Softmax
    4. TensorFlow Playground
    5. Summary
    6. Further reading
  8. Creating a Real-Estate Price Prediction Mobile App
    1. Setting up the artificial intelligence environment 
      1. Downloading and installing Anaconda
      2. Advantages of Anaconda
        1. Creating an Anaconda environment
      3. Installing dependencies
    2. Building an ANN model for prediction using Keras and TensorFlow
    3. Serving the model as an API
      1. Building a simple API to add two numbers
      2. Building an API to predict the real estate price using the saved model
    4. Creating an Android app to predict house prices
      1. Downloading and installing Android Studio
      2. Creating a new Android project with a single screen
      3. Designing the layout of the screen
      4. Adding a functionality to accept input
      5. Adding a functionality to consume the RESTful API that serves the model
      6. Additional notes
    5. Creating an iOS app to predict house prices
      1. Downloading and installing Xcode
      2. Creating a new iOS project with a single screen
      3. Designing the layout of the screen
      4. Adding a functionality to accept input
      5. Adding a functionality to consume the RESTful API that serves the model
      6. Additional notes
    6. Summary
  9. Implementing Deep Net Architectures to Recognize Handwritten Digits
    1. Building a feedforward neural network to recognize handwritten digits, version one
    2. Building a feedforward neural network to recognize handwritten digits, version two
    3. Building a deeper neural network
    4. Introduction to Computer Vision
      1. Machine learning for Computer Vision
      2. Conferences help on Computer Vision
    5. Summary
    6. Further reading
  10. Building a Machine Vision Mobile App to Classify Flower Species
    1. CoreML versus TensorFlow Lite
      1. CoreML
      2. TensorFlow Lite
      3. What is MobileNet?
    2. Datasets for image classification
      1. Creating your own image dataset using Google images
        1. Alternate approach of creating custom datasets from videos
      2. Building your model using TensorFlow
      3. Running TensorBoard
    3. Summary
  11. Building an ML Model to Predict Car Damage Using TensorFlow
    1. Transfer learning basics
      1. Approaches to transfer learning
        1. Building the TensorFlow model
          1. Installing TensorFlow
        2. Training the images
        3. Building our own model
        4. Retraining with our own images
        5. Architecture
        6. Distortions
        7. Hyperparameters
    2. Image dataset collection
      1. Introduction to Beautiful Soup
        1. Examples
      2. Dataset preparation
        1. Running the training script
    3. Setting up a web application
    4. Summary
  12. PyTorch Experiments on NLP and RNN
    1. PyTorch
      1. The features of PyTorch
      2. Installing PyTorch
      3. PyTorch basics
        1. Using variables in PyTorch
        2. Plotting values on a graph
      4. Building our own model network
        1. Linear regression
        2. Classification
        3. Simple neural networks with torch
        4. Saving and reloading data on the network
        5. Running with batches
        6. Optimization algorithms
      5. Recurrent neural networks
        1. The MNIST database
        2. RNN classification
      6. RNN cyclic neural network – regression
      7. Natural language processing 
        1. Affine maps
        2. Non-linearities
        3. Objective functions
        4. Building network components in PyTorch
        5. BoW classifier using logistic regression
    2. Summary
  13. TensorFlow on Mobile with Speech-to-Text with the WaveNet Model
    1. WaveNet
      1. Architecture
      2. Network layers in WaveNet
      3. The algorithm's components
      4. Building the model
      5. Dependencies 
        1. Datasets
      6. Preprocessing the dataset
        1. Training the network
      7. Testing the network
      8. Transforming a speech WAV file into English text
        1. Getting the model
        2. Bazel build TensorFlow and quantizing the model
        3. TensorFlow ops registration
      9. Building an Android application
        1. Requirements
    2. Summary
  14. Implementing GANs to Recognize Handwritten Digits
    1. Introduction to GANs
      1. Generative versus discriminative algorithms
      2. How GANs work
      3. Understanding the MNIST database
      4. Building the TensorFlow model
        1. Training the neural network
      5. Building the Android application
        1. Digit classifier
    2. Summary
  15. Sentiment Analysis over Text Using LinearSVC
    1. Building the ML model using scikit–learn
      1. Scikit-learn
      2. The scikit-learn pipeline
      3. LinearSVC
    2. Building the iOS application
    3. Summary
  16. What is Next?
    1. Popular ML–based cloud services
      1. IBM Watson services
      2. Microsoft Azure Cognitive Services
        1. Vision APIs
        2. Speech APIs
        3. Knowledge APIs
        4. Search APIs
        5. Language APIs
      3. Amazon ML
        1. Vision services
        2. Chat services
        3. Language services
      4. Google Cloud ML
    2. Building your first ML model
      1. The limitations of building your own model
      2. Personalized user experience
        1. Providing better search results
        2. Targeting the right user
    3. Summary
    4. Further reading
  17. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product Information

  • Title: Mobile Artificial Intelligence Projects
  • Author(s): Karthikeyan NG, Arun Padmanabhan, Matt R. Cole
  • Release date: March 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781789344073