BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Android Things Brings TensorFlow-Based Machine Learning and Computer Vision to IoT Devices

Android Things Brings TensorFlow-Based Machine Learning and Computer Vision to IoT Devices

Leia em Português

This item in japanese

Recently released Developer Preview 2 (DP2) for Android Things makes it easier to use TensorFlow for machine learning and computer vision on IoT devices. Additionally, it extends USB audio for several IoT platforms, adds Intel Joule support, and enables direct use of native drivers through a new Native PIO API.

A ready-to-use TensorFlow library pre-built for ARM and x86 is now provided with DP2 and can be used by just adding a single line to the build.gradle file. A sample included in DP2 demonstrates how to build a TensorFlow-enabled app to classify images captured from an attached camera and speak out the result if a speaker is available. The sample feeds TensorFlow with an inference model built using Google Inception deep convolutional neural network architecture.

DP2 also enables the use of existing native C/C++ drivers, which many developers have already written to communicate with peripherals such as lights, door locks, etc., through the new Native PIO API. The Native PIO API allows developers to extend Java-based Android Things app with C or C++ code which can be bound back to the Android Things framework. For example, a driver could generate a regular Android KeyEvent in response to a pin activation, or feed a GPS location into the Android location API. The new API also allows developers to write their Android Things apps entirely in C/C++, if they wish so, by calling the Native PIO API inside a NativeActivity.

As a final note, DP2 brings USB audio support to Intel Edison and Raspberry Pi 3, and introduces support for the Intel Joule platform, which brings to four the number of supported hardware platforms.

Android Things is Google’s IoT platform aimed to allow developers to write IoT applications similarly to how they write mobile apps by integrating the usual Android API and Google’s cloud services with a specific Things Support Library aimed to provide access to sensors and actuators, and to allow developers to inject custom hardware events into their apps through user drivers. Android Things uses Google Weave as its communication platform.

Rate this Article

Adoption
Style

BT