Reader small image

You're reading from  Hands-On Edge Analytics with Azure IoT

Product typeBook
Published inMay 2020
PublisherPackt
ISBN-139781838829902
Edition1st Edition
Right arrow
Author (1)
Colin Dow
Colin Dow
author image
Colin Dow

Colin Dow has been 3D printing since 2013 starting with the laser cut wooden frame version of the Ultimaker 3D printer. He has gone through a dozen or so 3D printers over the years from MakerBots, PrintrBots, early Prusa i3s, delta printers, and liquid resin printers. Colin has been working with OpenSCAD since 2014 using it with 3D printers to design and manufacture model rocketry parts for his model rocketry business. Through his aerospace workshops he has introduced many students to 3D printing including in-class demonstrations of 3D printing. Over the last few years Colin has been designing and building automated drones for his drone startup using 3D printers and OpenSCAD.
Read more about Colin Dow

Right arrow

Machine Learning and Edge Analytics

One of the most exciting fields in technology today is machine learning. As this technology matures and gets into the hands of more and more people, exciting new applications are created, such as a tool for detecting respiratory diseases based on the audio analysis of breathing patterns.

By combining edge analytics with machine learning, the capabilities on the sensory side are enormous. This, combined with the ever-increasing power of microcontrollers and single-board computers, such as the Raspberry Pi, means that the future looks very bright indeed for edge analytics and machine learning.

In this chapter, we will explore the advantages of machine learning at the edge with a Raspberry Pi as we write a program to distinguish between the face of a person and the face of a dog. We will then jump into the exciting new world of Artificial Intelligence...

Understanding machine learning and how it works with edge analytics

Machine learning can trace its origins back to 1949 in a book entitled, The Origins of Behavior, by Donald Hebb. In his book, Hebb describes concepts that relate to artificial neural networks. Arthur Samuel of IBM coined the phrase machine learning in 1952 after inventing a computer program for playing checkers.

For edge analytics, machine learning at the edge brings significant advantages. Picture, if you will, an automated security door application that scans a person's face and performs analysis on the person's voice to determine whether the door should open.

A traditional IoT approach may look like the following:

As we can see, a webcam is used to take a picture of Ted's face and a microphone listens to Ted's voice. A copy of the picture and a sound file of Ted's speech is sent to...

Using edge intelligence with microcontrollers

As microcontrollers become more powerful, they can process more at the edge. Machine learning-type applications using microcontrollers, particularly in the field of machine vision, are becoming more common. The relatively low cost of these microcontrollers makes it easy to fill up a workshop with many different models and brands.

In this section, we will look at a few of these microcontrollers before we build a QR code reader using the Maix K210 microcontroller.

Exploring the various models of camera-based microcontrollers

The majority of camera-based microcontrollers are based on the ESP32. The two main programming languages for ESP32-based microcontrollers are Arduino C and MicroPython...

Other offerings of machine learning and Azure IoT Edge

Pushing machine learning to the edge brings all of the benefits of edge computing to a machine learning device. These include increased security, increased reliability, and reduced latency. In this section, we will look at two of Azure's machine learning offerings for IoT Edge, Azure Machine Learning designer, and Azure Custom Vision.

Azure Machine Learning designer

The Azure Machine Learning designer is a visual interface for creating machine learning models. The tool provides an interactive canvas on which the user connects datasets and modules. With the Azure Machine Learning designer, you create pipelines of these connected datasets and modules to publish to a...

Summary

In this chapter, we looked at the power of combining edge analytics with machine learning. With edge analytics, the latency and reliability of machine learning algorithms are much improved. We looked at how pushing machine learning processing onto the edge improves an application such as an automated security door application, where having a reduced latency is critical.

We then did a practical vision recognition example where our program was able to distinguish a human face from the face of a dog. We looked at the power of the current crop of camera-based microcontrollers by programming it to decode the payload on a QR code. We finished this chapter by taking a brief look at what Microsoft offers for machine learning on the edge.

What you do with the knowledge gained from this chapter is up to you. Maybe you own or know someone who owns a small security firm and may be...

Questions

Having learned the lessons in this chapter, try answering the following questions on your own:

  1. True/False. Machine learning can trace its roots back to the work of Tim Berners-Lee in the 1960s.
  2. True/False. TensorFlow was developed and then released to the public in 1991 by Microsoft.
  1. True/False. Using the OpenCV library and the appropriate cascade file, we can detect a human face in a picture.
  2. What is the name of the Python library we used to flash an LED?
  3. List three camera-based microcontroller boards on the market.
  4. True/False. The ESP-EYE does not come with a microphone built in.
  5. True/False. Scanning a QR code in grayscale reduces the load on the microcontroller's processor.
  6. What is the name of the function we apply to the LED to turn it into an alarm?
  7. True/False. The URL for Microsoft's custom vision website is www.customvision.ai.
  8. True/False. The Azure...

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Edge Analytics with Azure IoT
Published in: May 2020Publisher: PacktISBN-13: 9781838829902
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

Author (1)

author image
Colin Dow

Colin Dow has been 3D printing since 2013 starting with the laser cut wooden frame version of the Ultimaker 3D printer. He has gone through a dozen or so 3D printers over the years from MakerBots, PrintrBots, early Prusa i3s, delta printers, and liquid resin printers. Colin has been working with OpenSCAD since 2014 using it with 3D printers to design and manufacture model rocketry parts for his model rocketry business. Through his aerospace workshops he has introduced many students to 3D printing including in-class demonstrations of 3D printing. Over the last few years Colin has been designing and building automated drones for his drone startup using 3D printers and OpenSCAD.
Read more about Colin Dow