TL;DR: Yes! Test the low-code machine learning app here.

Today the vast majority of organizations collect data in one way or another, and more and more wish to utilize this data by means of descriptive and even predictive analytics. Predictive analytics, also called machine learning, has become a significant competitive differentiator for many of these organizations. Ranging from relatively simple logistic regression models to predict sales, to advanced computer vision models that can predict if a patient has malignant cells based on a scan.

While universities try to keep up with educating data scientists, another and larger challenge is finding its way to the surface: the need for Machine Learning engineering.

Creating a machine learning model is one thing, deploying it and maintaining it is another. Currently 9 out of 10 models don’t make it to production, resulting in a major loss of value — economic value, but also scientific and societal value.

Setting up or even building your serving environment to run your Python and R code requires very different skills than what’s needed to build a data science model itself.

And that’s where UbiOps comes in.

UbiOps takes care of this engineering part, so you can easily turn your models, functions and scripts into live services.

And where UbiOps eases running your analytics models, low-code eases the software development approach.

How Low-Code and ML Accelerate Innovation

For most organizations, the challenges regarding application development have been there for years: building enterprise class applications is hard, there are too few developers, and the business environment changes faster than the software and systems can handle.

With low-code, many of those challenges can be tackled by accelerating every stage of the app development and delivery process. According to Gartner, low-code will be responsible for more than 65% of application development activity by 2024.

With low-code in general, and OutSystems in particular, companies can change the way they deliver enterprise applications. They can truly focus on innovation and business value, knowing that OutSystems takes care of the non-functional requirements such as security, scalability and performance.

They can build applications fast, right, and for the future.

Combining OutSystems with UbiOps allows companies to innovate even more: making sure that the analytics model does deliver its desired value to the end user by creating data science based applications.

Applications to predict churn, detect fraud, recommend products, or any other kind of app that uses analytics can be created in a fraction of the time it usually takes.

Rapid development and numerous integration possibilities makes it easy to create the app and to connect the machine learning models to it.

Low-Code and Machine Learning in Action: Object Recognition Use Case

To showcase the combination of UbiOps and OutSystems, we developed a simple mobile app that you can use to detect objects. For this app we needed to create:

  1. An UbiOps account;
  2. Deployment package (download here);
  3. An OutSystems account;
  4. The actual app (download here).

The high level architecture looks like this:

outsystems and ubiops

Deployment of YOLOv4 Object Recognition Model on UbiOps

In the world of object detection, the “you only look once” (YOLO) algorithm is one of the most trusted and proven algorithms. We are not going to explain the inner workings of the algorithm. Instead, we are going to focus on:

  1. How to deploy a pre-trained version (YOLOv4) on UbiOps;
  2. How to create a token for that deployment so that we can use it in our OutSystems app.

Step 1: Deploy Pretrained Version

In order to get an algorithm onto UbiOps you need to do a few things. Most importantly you need to define inputs and outputs and add your algorithm code. Today, however, we are going to skip it by using a completely premade package that we can import. You can do that by going to the imports/exports menu and then clicking on import.

Building an Object Recognition Model on UbiOps and OutSystems

You will see a screen similar to the image above.

Upload the zip you downloaded earlier and click “next”. After that you can immediately press the confirm button. Everything should be correct.

After that you will see a new deployment in your list of deployments. You have to find the API endpoint of that deployment. You can find it here:

Building an Object Recognition Model on UbiOps and OutSystems 

Step 2: Create an Authentication Token

We now have the API endpoint, and we can use that in the OutSystems app. But we need something else from UbiOps: we need a secure method of authentication, so that not every app can use our deployment.

Create a new Token by going to the token menu in the permissions section. If you click “add token” you will see something similar to the screenshot below:

Building an Object Recognition Model on UbiOps and OutSystems

There will be three steps in creating a token.

In the first step only the name is required for now. Skip the rest and click “Next”.

In step 2, give the token a role. This will give it access to the permissions specified in this role only. In this case, we can fill in the following:

Building an Object Recognition Model on UbiOps and OutSystems

Click “assign” and then next. You will now see your token string. Copy this and keep it because you will not be able to get it again.

Take the Token string and the API endpoint and continue with setting up OutSystems.

Designing the Mobile App with OutSystems

To develop the mobile application to capture an image and send it to UbiOps to process its data and return the detected objects, we use OutSystems’ IDE called ServiceStudio. We have to:

  1. Consume the UbiOps end-point;
  2. Create a page to take an image and display the results;
  3. Publish the application.

In ServiceStudio, we start by creating a new application from scratch.

Choose a Phone App as a template and give the app an icon and a name. Based on this, the app gets created and common functionality like a splash screen, login functionality, a home page and a look and feel derived from the base colors from the icon we chose.

Step 1: Consume the UbiOps End-Point

From there, we immediately start consuming the UbiOps REST endpoint for the Yolo4 model. We use the URL provided, select Post for the method as we are going to send a picture, and define the request and response according to UbiOps specifications:

Building an Object Recognition Model on UbiOps and OutSystems

In the Headers and Authentication tab we add an Authorization header, so we can provide the security token in the request.

Step 2: Create a Page to Take an Image and Display the Results

Since a blank homepage has already been created, we’ll use it to add the functionality.

First, we add the Camera Plugin from the Forge, OutSystems library of open source components, and select the TakePicture action.

Then, we add a camera icon to the page and create the functionality behind it, the so-called ‘handler’. In this handler, we are first calling the TakePicture action, then storing the image as a blob, and finally calling the UbiOps Yolo with the identifier of that blob.

The output of this service can be used on the page to display the image and a list of the detected objects:

Building an Object Recognition Model on UbiOps and OutSystems

Step 3: Publish the Application

The last step we need to take is to publish our application so we can start using it. Publishing is as easy as clicking the green button in the top (if it is red, OutSystems has detected that your application still has some errors) and waiting for OutSystems to finish.

We can test it in the browser, but because we developed a mobile app, we can run it as a Progressive Web App on our mobile phone right away by scanning the QR-code:

Building an Object Recognition Model on UbiOps and OutSystems

And here you have it, the result:

Building an Object Recognition Model on UbiOps and OutSystems

You can download this OutSystems application from the Forge so you can try it yourself:

UbiOps Forge component

Note: You will see that we’ve added more functionality than we described in this article.

Wrapping Up

With two platforms, an open-source AI model and some knowledge of software development, you can create your own AI-powered application.

In this article, we didn’t focus on the performance of the deep learning model for this project, so not all objects will be detected correctly. However, the goal was to illustrate how quickly you can build an end-to-end application with just two platforms.

Would you like to build something similar? Feel free to create a free account with OutSystems and UbiOps. If you have any questions, please reach out.

We hope you enjoyed this read and, hopefully, we inspire you to build your own project!