Reader small image

You're reading from  Machine Learning for Mobile

Product typeBook
Published inDec 2018
PublisherPackt
ISBN-139781788629355
Edition1st Edition
Right arrow
Authors (2):
Revathi Gopalakrishnan
Revathi Gopalakrishnan
author image
Revathi Gopalakrishnan

Revathi Gopalakrishnan is a software professional with more than 17 years of experience in the IT industry. She has worked extensively in mobile application development and has played various roles, including developer and architect, and has led various enterprise mobile enablement initiatives for large organizations. She has also worked on a host of consumer applications for various customers around the globe. She has an interest in emerging areas, and machine learning is one of them. Through this book, she has tried to bring out how machine learning can make mobile application development more interesting and super cool. Revathi resides in Chennai and enjoys her weekends with her husband and her two lovely daughters.
Read more about Revathi Gopalakrishnan

Avinash Venkateswarlu
Avinash Venkateswarlu
author image
Avinash Venkateswarlu

Avinash Venkateswarlu has more than 3 years' experience in IT and is currently exploring mobile machine learning. He has worked in enterprise mobile enablement projects and is interested in emerging technologies such as mobile machine learning and cryptocurrency. Venkateswarlu works in Chennai, but enjoys spending his weekends in his home town, Nellore. He likes to do farming or yoga when he is not in front of his laptop exploring emerging technologies.
Read more about Avinash Venkateswarlu

View More author details
Right arrow

Chapter 10. Mobile Application Using Google Vision

As we saw in Chapter 1, Introduction to Machine Learning on Mobile, we know that machine learning in mobile applications can be implemented either on-device or it can be implemented using machine learning cloud provider services. There are various machine learning cloud providers:

  • Clarifai
  • Google Cloud Vision
  • Microsoft Azure Cognitive Services
  • IBM Watson
  • Amazon Machine Learning

In this chapter, we are going to dive deeply into Google Cloud Vision to understand the following:

  • Features of Google Cloud Vision
  • How to utilize the Google Cloud Vision label-detection technique in an Android Mobile application to determine what is the picture taken by the camera. That is, we basically feed an image into Google Cloud Vision and see how it labels the image. Google Vision is going to predict the image that it receives from the mobile application and provide a label for the image. 

Features of Google Cloud Vision


Google Cloud Vision API comprises various complex and powerful machine learning models that help to perform image analysis. It classifies images into various categories using an easy-to-use REST API. The important features provided by Google Cloud Vision include the following:

  • Label detection: This enables us to classify images into thousands of categories. The images can be categorized into various common category labels, such as animals and fruits.
  • Image attribute detection: This enables us to detect individual objects from within images. It can also detect attributes such as prominent color.
  • Face detection: This enables us to detect faces from within images. If there are multiple faces in the images, each can be detected individually. It can also detect the prominent attributes associated with a face, such as wearing a helmet.
  • Logo detection: This enables us to detect printed words from images. Prominent logos are trained which can be detected.
  • Landmark detection...

Sample mobile application using Google Cloud Vision


In this section, we are going to try a sample Android mobile application using Google Cloud Vision. We are going to capture an image from the camera of the cell phone, upload the image to Google Cloud Vision, and see what it predicts the image to be. This is going to use the label detection feature of Google Cloud Vision, which determines the label of the uploaded image.

How does label detection work?

The Vision API can detect and extract information about entities within an image, across a broad group of categories. Labels can identify objects, locations, activities, animal species, products, and more. Labels are returned in English only.

The image whose label is to be determined and the features of the Google Vision that we intend to use needs to be sent in the request API. The feature can be any of the features listed in the Features of Google Cloud Vision section, such as label detection or logo detection. If there is any additional image...

Summary


In this chapter, we looked at how Google Cloud Vision works, and can how to invoke it from a mobile application without much effort. We saw how easy it is to make complex machine learning predictions without the hassles of model selection and training. In the next chapter, we will explore the future of machine learning in the field of mobile applications. 

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Machine Learning for Mobile
Published in: Dec 2018Publisher: PacktISBN-13: 9781788629355
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Revathi Gopalakrishnan

Revathi Gopalakrishnan is a software professional with more than 17 years of experience in the IT industry. She has worked extensively in mobile application development and has played various roles, including developer and architect, and has led various enterprise mobile enablement initiatives for large organizations. She has also worked on a host of consumer applications for various customers around the globe. She has an interest in emerging areas, and machine learning is one of them. Through this book, she has tried to bring out how machine learning can make mobile application development more interesting and super cool. Revathi resides in Chennai and enjoys her weekends with her husband and her two lovely daughters.
Read more about Revathi Gopalakrishnan

author image
Avinash Venkateswarlu

Avinash Venkateswarlu has more than 3 years' experience in IT and is currently exploring mobile machine learning. He has worked in enterprise mobile enablement projects and is interested in emerging technologies such as mobile machine learning and cryptocurrency. Venkateswarlu works in Chennai, but enjoys spending his weekends in his home town, Nellore. He likes to do farming or yoga when he is not in front of his laptop exploring emerging technologies.
Read more about Avinash Venkateswarlu