Starting with the “Smart Phone” the expansion of devices that can manage data in an autonomous manner has been wide ranging. IoT is also known as “Internet of Things”. “Things” (aka devices) that can collect data and/or perform actions in an autonomous manner. The interconnection of these devices offers an abstraction layer to form 'smart' systems.
These Internet of Things technology advances were empowered by the wide spread adoption of the Cloud. Cloud Computing means storing and accessing data and programs over the internet instead of using the computer’s hard drive. Analysis using these cloud-based resources can be produced with horizontal scaling methods which adds compute power to workloads. Essentially, what 1 computer can do in 50 hours, 50 horizontally scaled compute units can do in 1 hour.
This allows for lighter computing units within the on-premises edge of the overall solution. Interestingly enough, advances in microchips are producing low power micro controllers as a source of sensors, gateways and distributed compute units. On-premises processing of data further decreases the input/output of data being put in transit as it transferred by processing.
So, our demonstrated solution in this post will be the automation of facial recognition processing on with the webcam viewing images at the Edge Network and sending summarized “faces” to post on Twitter. We will implement the facial recognition application by using OpenCV (Open Source Computer Vision Library).
Using Node-Red (key part of IBM Watson IoT platform’s Developer experience), automated video captures of the results can be stored on the cloud as well as “tweeting” the results. Don’t be overwhelmed by all of the really cool and tech heavy topics here, just buckle up and enjoy the post.
High Level ArchitectureI’ve got an old Logitech USB (Webcam c260) laying around, so let’s put it to use. It isn’t the latest and greatest from the Logitech line, but here are the highlights:
- Ultra-clear video recording and smooth video calling in 16:9 widescreen (1280 × 720) delivered by Logitech Fluid CrystalTM Technology
- Vibrant 3 MP photos
- Auto light correction and built-in noise-cancelling mic make video calls look and sound great
Just to get a visual, here are some IoT Devices that I considered using in this type of demo, each with their own pros and cons.
Ultimately, I will be using the Intel Edison with Breakout board. After taking some time to get to know my new Linux Distribution, Yocto Project (3.10.98-poky-edison+), I did a deep dive on Intel® Edison BSP source package which is the set of Yocto source files necessary to generate a Linux image ready to run on the Intel® Edison board.
Note that an SDK is created in the “Build system” process step. I mounted the USB Webcam and installed OpenCV using BitBake.
ApplicationsDrawing a comparison for my Portfolio Management friends here. Facial Recognition is much like finding the diversification potential in a portfolio optimization process.
Applying the additional step of Linear Discriminant Analysis of the dimensional space that resulted from Principal Component Analysis (PCA) of the sample images, I’ll find the facial features to discriminate between the objects within the image capture to identify actual faces. If you find that statement to be a lot, check out the math:
Eigen FacesInvented by the great statistician Sir R. A. Fisher, it performs a class-specific dimensionality reduction. Avoid the “Curse of Dimensionality”!
Now we know that the Intel® Edison will be taking images from the Web Camera and performing facial recognition within the video stream, let’s coordinate what to do with the output. Node-RED is a light-weight run-time built on Node.js, taking full advantage of its event-driven, non-blocking model. It works well on small devices (Raspberry Pi, Arduino) and the Cloud (IBM Bluemix, AWS and Azure). If you’ve got Node.js installed, then its a breeze to install with package manager:
sudo npm install -g --unsafe-perm node-red
Run “node-red” and access the user interface on the IP address of the device, per instructions. You’ll find it’s actually kind of fun ‘programming’ directly on the devices. After quickly wiring it all together, this Node-RED function will monitor my Twitter stream and take a picture based on key words of my designation (by the way – ultimate drinking game).
Here's what happens when I tweet my trigger word:
So now that your wireless is enabled, 9-volt remotely mountable “SmartCamera” solution can take images while finding faces triggered off of your Twitter stream, let’s let the machines take it to the next level. Just a few comments left here – Don’t get scared!
Advances in AI and Cognitive Services allows for more than just face detection. Here are a few capabilities worth checking out.
- Face Verification
- Face Identification
- Emotion Detection
- Face Searching
- Face Grouping
Comments