Reader small image

You're reading from  Mobile Artificial Intelligence Projects

Product typeBook
Published inMar 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789344073
Edition1st Edition
Languages
Right arrow
Authors (3):
Karthikeyan NG
Karthikeyan NG
author image
Karthikeyan NG

Karthikeyan NG is the Head of Engineering and Technology at the Indian lifestyle and fashion retail brand. He served as a software engineer at Symantec Corporation and has worked with 2 US-based startups as an early employee and has built various products. He has 9+ years of experience in various scalable products using Web, Mobile, ML, AR, and VR technologies. He is an aspiring entrepreneur and technology evangelist. His interests lie in exploring new technologies and innovative ideas to resolve a problem. He has also bagged prizes from more than 15 hackathons, is a TEDx speaker and a speaker at technology conferences and meetups as well as guest lecturer at a Bengaluru University. When not at work, he is found trekking.
Read more about Karthikeyan NG

Arun Padmanabhan
Arun Padmanabhan
author image
Arun Padmanabhan

Arun Padmanabhan is a Machine Learning consultant with over 8 years of experience building end-to-end machine learning solutions and applications. Currently working with a couple of start-ups in the Financial and Insurance industries, he specializes in automating manual workflows using AI and creating Machine Vision and NLP applications. In past, he has led the data science team of a Singapore based product startup in the restaurant domain. He also has built stand-alone and integrated Machine Learning solutions in the Manufacturing, Shipping and e-commerce domains over the years. His interests are in research, development and applications of Artificial Intelligence and Deep Architectures.
Read more about Arun Padmanabhan

Matt Cole
Matt Cole
author image
Matt Cole

Matt R. Cole is a developer and author with 30 years' experience. Matt is the owner of Evolved AI Solutions, a provider of advanced Machine Learning/Bio-AI, Microservice and Swarm technologies. Matt is recognized as a leader in Microservice and Artificial Intelligence development and design. As an early pioneer of VOIP, Matt developed the VOIP system for NASA for the International Space Station and Space Shuttle. Matt also developed the first Bio Artificial Intelligence framework which completely integrates mirror and canonical neurons. In his spare time Matt authors books, and continues his education taking every available course in advanced mathematics, AI/ML/DL, Quantum Mechanics/Physics, String Theory and Computational Neuroscience.
Read more about Matt Cole

View More author details
Right arrow

Building a Machine Vision Mobile App to Classify Flower Species

In this chapter, we are going to use the theoretical knowledge we have learned in previous chapters to create a mobile application that will classify a specific species of flower. By utilizing use your mobile camera and pointing it at a flower, the application will analyze the image and make its best educated guess as to the species of that flower. This is where we put to work the understanding we have gained about the workings of a convolutional neural network (CNN). We will also learn a bit more about using TensorFlow as well as some tools such as TensorBoard. But before we dive in too deep, let’s talk about a few things first.

Throughout this chapter we use terms that may not be familiar to all, so let’s make sure we’re all on the same page as to what they mean.

In this chapter, we will cover...

CoreML versus TensorFlow Lite

In the machine learning world, there are two efforts (as of the time of this writing) taking place in order to improve the mobile AI experience. Instead of offloading AI or ML processing to the cloud and a data center, the faster option would be to process data on the device itself. In order to do this, the model must already be pre-trained, which means that there is a chance that it is not trained for exactly what you are going to use it for.

In this space, Apple’s effort (iOS) is called Core ML, and Google’s (Android) is called TensorFlow Lite. Let’s talk briefly about both.

CoreML

The CoreML framework from Apple provides a large selection of neural network types. This allows...

Datasets for image classification

For our flower classification example, we will be using the University of Oxford's Visual Geometry Group (VGG) image dataset collection. The collection can be accessed at http://www.robots.ox.ac.uk/~vgg/data/.

The VGG is the same department that won previous ImageNet competitions. The pretrained models, such as VGG14 and VGG16, were built by this department and they won in 2014 and 2016, respectively. These datasets are used by the VGG to train and evaluate the models that they build.

The flower dataset can be found in the Fine-Grain Recognition Datasets section of the page, along with textures and pet datasets. Click on Flower Category Datasets, or use the following link to access the flower datasets from VGG, http://www.robots.ox.ac.uk/~vgg/data/flowers/.

Here, you can find two datasets, one with 17 different species of flowers, and the...

Summary

In this chapter we have accomplished a lot in this small chapter. We began the chapter with understanding the various datasets that are available for image classification, as well as how we could obtain or create images if we could not find any that met our requirements. Next, then divided the chapter into two distinct sections. In the first section we learned about creating our own image dataset. In the second section we learned how to use TensorFlow to build the model.

In the next chapter, we are going to extend our TensorFlow knowledge even further by using various TensorFlow libraries to build a machine learning model which will predict body damage done to a car.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mobile Artificial Intelligence Projects
Published in: Mar 2019Publisher: PacktISBN-13: 9781789344073
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 (3)

author image
Karthikeyan NG

Karthikeyan NG is the Head of Engineering and Technology at the Indian lifestyle and fashion retail brand. He served as a software engineer at Symantec Corporation and has worked with 2 US-based startups as an early employee and has built various products. He has 9+ years of experience in various scalable products using Web, Mobile, ML, AR, and VR technologies. He is an aspiring entrepreneur and technology evangelist. His interests lie in exploring new technologies and innovative ideas to resolve a problem. He has also bagged prizes from more than 15 hackathons, is a TEDx speaker and a speaker at technology conferences and meetups as well as guest lecturer at a Bengaluru University. When not at work, he is found trekking.
Read more about Karthikeyan NG

author image
Arun Padmanabhan

Arun Padmanabhan is a Machine Learning consultant with over 8 years of experience building end-to-end machine learning solutions and applications. Currently working with a couple of start-ups in the Financial and Insurance industries, he specializes in automating manual workflows using AI and creating Machine Vision and NLP applications. In past, he has led the data science team of a Singapore based product startup in the restaurant domain. He also has built stand-alone and integrated Machine Learning solutions in the Manufacturing, Shipping and e-commerce domains over the years. His interests are in research, development and applications of Artificial Intelligence and Deep Architectures.
Read more about Arun Padmanabhan

author image
Matt Cole

Matt R. Cole is a developer and author with 30 years' experience. Matt is the owner of Evolved AI Solutions, a provider of advanced Machine Learning/Bio-AI, Microservice and Swarm technologies. Matt is recognized as a leader in Microservice and Artificial Intelligence development and design. As an early pioneer of VOIP, Matt developed the VOIP system for NASA for the International Space Station and Space Shuttle. Matt also developed the first Bio Artificial Intelligence framework which completely integrates mirror and canonical neurons. In his spare time Matt authors books, and continues his education taking every available course in advanced mathematics, AI/ML/DL, Quantum Mechanics/Physics, String Theory and Computational Neuroscience.
Read more about Matt Cole