DEV Community

Cover image for On-Device Machine Learning Tools (ML for Android and iOS)
amananandrai
amananandrai

Posted on

On-Device Machine Learning Tools (ML for Android and iOS)

What are On-Device Machine Learning Tools?

Cutting-edge technologies that enable conversational understanding and image recognition, are built using combinations of machine learning technologies such as deep neural networks and graph-based machine learning. However, the machine learning systems that power most of these applications run in the cloud and are computationally intensive and have significant memory requirements.

on device

What if you want machine intelligence to run on your personal phone or smartwatch, or on IoT devices, regardless of whether they are connected to the cloud? The answer to this question is on-device Machine learning tools.

Today’s mobile devices are increasingly powerful. This gives us the opportunity to leverage machine learning techniques that can run on-device. This is important for several reasons, like being able to access certain applications instantly and not be dependent on connectivity. It’s also important in situations when you might be dealing with personal data, where you don’t want anything to leave your device.


Two of the most famous On-Device ML Tools provided by the most famous techgiant Google are :-

  • TensorFlow Lite
  • ML Kit

TensorFlow Lite

TensorFlow Lite

How do you take advantage of revolutionary machine learning tools and capabilities on a mobile? The answer is TensorFlow Lite. This powerful machine learning framework can help run machine learning models on Android and iOS devices that would never normally be able to support them. Today, TensorFlow Lite is active on billions of devices globally. And its set of tools can be used for all kinds of powerful neural network-related applications, from image detection to speech recognition, bringing the latest cutting-edge technology to the devices we carry around with us wherever we go.

TensorFlow Lite allows much of the machine learning processing to be carried out on the devices themselves, using less computationally intensive models, which don’t have to depend on a server or data center. These models run faster, offer potential privacy improvements, demand less power (connectivity can be a battery hog), and crucially, in some cases, don’t require an internet connection. On Android, TensorFlow Lite accesses specialist mobile accelerators through the Neural Network API providing even better performance while reducing power usage.

TensorFlow Lite

To know more about TensorFlow Lite click this link

ML Kit

ml kit

ML Kit brings Google’s on-device machine learning technologies to mobile app developers, so they can build customized and interactive experiences into their apps. This includes tools such as language translation, text recognition, object detection and more. ML Kit makes it possible to identify, analyze, and to some extent, understand visual and text data in real-time, and in a user privacy centric way, since data stays on the device.

ML Kit’s processing happens on-device. This makes it fast and unlocks real-time use cases like processing of camera input. It also works while offline and can be used for processing images and text that need to remain on the device.

mlkit

It provides two types of APIs :-

  • Vision APIs
  • Natural Language APIs

1 - Vision APIs

Video and image analysis APIs to label images and detect barcodes, text, faces, and objects.

It includes different APIs namely

(i) Barcode Scanning

Scan and process barcodes. Supports most standard 1D and 2D formats.

(ii) Face Detection

Detect faces and facial landmarks.

(iii) Image Labelling

Identify objects, locations, activities, animal species, products, and more. Use a general-purpose base model or tailor to your use case with a custom TensorFlow Lite model.

(iv) Object Detection & Tracking

Localize and track in real time one or more objects in the live camera feed.

(v) Text Recognition

Recognize and extract text from images.

2 - Natural Language APIs

Natural language processing APIs to identify and translate between 58 languages and provide reply suggestions.

It includes the APIs :-

(i) Language ID

Determine the language of a string of text with only a few words.

(ii) On Device Translation

Translate text between 58 languages, entirely on device.

(iii) Smart Reply

Generate reply suggestions in text conversations.

To know more about ML Kit click this link

Top comments (0)