Machine Learning Becomes Mobile with Fritz AI

0
49
Fritz AI

Machine learning is playing a more leading role in the lives of our technologies since its introduction. We saw a glimpse of the future of machine learning in both Google and Apple 2018 keynotes. Both companies introduced an array of different apps and features that heavily rely on machine learning modules, including Google’s advanced voiced assistant and Apple’s measure app.

While it might seem like machine learning has just recently become a buzzword and its popularity is just growing at an exponential rate, it is not at all true. Machine learning actually has an extremely rich history that dates back to 1950s, when Alan Turing built a super computer to determine if it was able to pass the Turing Test. Since then, we’ve got a number of different computers acing at tasks that were previously only performed by humans such as playing chess, routing maps, building robots that can navigate obstacles, and so on.

However, we have come a long way from that. As technology has become smarter – so have our computers and our machine learning algorithms. They have also become smaller and faster. Computers which would originally take up an entire room can now fit in the palm of our hands.

Mobiles and smartphones have become some of the most important gadgets in our lives. So, it’s definitely no surprise that machine learning is now becoming more mobile.

The Mobile Generation

All the major technology trends are shifting, making mobiles one of the most prominent devices in today’s world. According to a study conducted by Stone Temple, about 63% of traffic came from mobiles in 2017, surpassing the number of searches on desktops. It is expected that the number of mobiles on the market will double within the next decade, with more people spending more time and money on mobiles, as compared to desktops.

Machine learning is no exception, the latest features such as face recognition and face unlock on the latest smartphones also include machine learning algorithms that make your smartphone, actually smart. However, running machine learning rich apps on a smartphone is not as easy as it looks.

There are two different ways to incorporate machine learning on a mobile device – cloud-based and on-device inference. Cloud-based services are algorithms that are stored on the cloud and requires your device to be connected to the internet to run the algorithm (something like the Google Voice Assistant). On the other hand, on-device inference is when the machine learning algorithms are loaded onto the phone and doesn’t require a constant connection to the internet (this could include Apple’s FaceID feature).

While cloud-based is more popular as it doesn’t take a load on the phone’s RAM and storage, it does, however, require constant connection to the internet. But on-device models are faster to access and also do not require a constant internet connection.

Fritz AI

This is where Fritz plays an important role. Fritz is an end-to-end solution for on-device machine learning that allows developers to create machine-learning based features that can run easily on any operating system.

Fritz aims to make it easier for developers to deal with the finite resources that are available on devices to build amazing apps that include machine learning models which can be run seamlessly on both Android and Apple devices. With Google and Apple pushing their own ML frameworks, developers are often left having to choose between the two. Fritz is looking to offer free and better tools that simplify developer’s lives by allowing them to build cross-platform apps that run natively on both platforms.

The company’s CEO and co-founder, Jameson Toole told TechCrunch, “What we want the developers to do is build a model and then we take care of the rest.”

Fritz is agnostic as to the runtime that the models are actually using. This allows developers to bring their models built on other frameworks such as Core ML, TensorFlow Lite and TensorFlow Mobile to Fritz, where the SDK can monitor their performance and help developers push updated models to their apps without having to release a new version.

The Fritz platform helps users avoid the common problems that they usually face when deploying machine learning models and don’t require them to be an expert in latency or compression either.

At the moment, all of Fritz services are free, but the company is expecting to add more premium services, including collaboration tools and automation features for managing and tweaking models. The current line-up includes standard models for cases such as image labeling and object detection. The company also offers a number of different tutorials on Machine Learning such as Intro to Machine Learning on Android.

A Guide to Quickly Integrating the SDK

Fritz is extremely new to the market and it has a lot of potential to grow and become a contender in the machine learning segment. Now that you know all about Fritz, let’s quickly cover how to integrate the SDK for your next project.

Step 1: Create a new project by clicking on the ‘Add a new project’ in the webapp. You will need to create an account on the website, before you can access the webapp.

fritz_start_a_new_project

Step 2: Once, you’ve added a new project, you can now create your first app. You’ll receive instructions on how to install and configure the Fritz Core SDK in your app. Once, you’ve installed and configured the SDK, you’ll have access to the features and the custom models.

adding_fritz_to_app

Let’s break it down further for iOS and Android

For iOS

To add the Fritz SDK to your iOS app you can add it through CocoaPods. You will need to make a Podfile using the following code:

$ pod init

In the podfile, add the following code:

$ pod ‘Fritz’

Now, save and run the file using the following code:

$ pod install

This should create an ‘.xcworkspace’ file, which you can simply use for all your future iOS projects to integrate Fritz into your app.

You will need to register you app with Fritz, which you can do from the Project Overview Page. After that, you will need to add Fritz-Info.plist to you app in all the targets. You can download the file, if you don’t already have it, from the Project Settings page. Now, simply initialize the SDK with your API key.tialize the SDK with your API key.

Android

For Android, you can integrate the SDK using gradle. You will need to add the repository to download the libraries, you can do that using the following code below:

Now, add the gradle dependencies:

You will need to edit your app’s AndroidManifest.xml and add the fritz_api_key and INTERNET permissions. You can use the code below, but do change the API key and insert your own key:

Now, in your application or MainActivity class, initialize the SDK using the following code:
public class MainActivity extends AppCompatActivity {

Your SDK should be ready to use.

We hope that this has been a helpful guide to help you learn about the importance of mobile machine learning, as well as Fritz and how to integrate the Fritz SDK to start using in your own apps. If you have previously used Fritz, let us know if you like it and if you have any questions, feel free to drop them in the comments section below!

LEAVE A REPLY

Please enter your comment!
Please enter your name here