Machine learning is everywhere these days, from spam filtering and facial recognition to voice assistants and driverless cars. But you don’t need a master’s degree to learn how to use this exciting technology, thanks to a new app from Microsoft called Lobe.
Lobe simplifies the process of machine learning, so that anyone can create AI (artificial intelligence) models without any coding knowledge. We’ll explain how Lobe works and how to get started with this smart new tool.
What Is Microsoft Lobe?
Lobe is a free desktop app for Windows and macOS that lets people with no programming or data science experience conduct experiments in artificial intelligence. It also allows developers to add machine learning capabilities to their own apps.
Acquired by Microsoft in September 2018, Lobe lets you build machine learning models using a simple visual interface rather than writing code. In the current public preview, you can classify sets of images, so that Lobe can identify the contents of similar pictures.
On its AI blog, Microsoft gives the examples of Lobe being trained to recognize poisonous berries, protect marine resources by spotting whales in photos, and send alerts when parking spots become available. It’s also been used in a beekeeping project to detect unwanted insects invading a hive.
Microsoft plans to expand Lobe’s features in the future to train other types of models. These will include object detection, which locates specific items in images, and data classification, which labels information in tables.
Here’s how to create a machine learning model using Lobe’s image classification feature.
1. Download and Install Microsoft Lobe
To get the Lobe app for Windows or macOS, click the Download button on the homepage or in the top-right corner of the Lobe website. You’ll need to enter a few personal details to join the Lobe Beta, including your name, email address, and country, but as Microsoft doesn’t verify this information, you can fake it.
Indeed, one of the best things about Lobe is that it doesn’t compromise your privacy. The app works offline and any data you import remains on your computer, rather than being uploaded to the cloud (and Microsoft).
It’s a pretty large download (378MB at the time of writing) and takes a few minutes to install. Once done, you can start using Lobe straight away, as there aren’t any settings to configure. Just check the Run Lobe box and click Finish.
2. Add and Label Images in Lobe
When Lobe opens, click the New Project button in the bottom-left corner of the home screen. Enter a name for your project in the top left. You can now add and label some images to create your first machine learning model.
Click the Import button in the top-right corner and choose whether to add images from your computer, capture shots from a webcam, or import an existing dataset in the form of a structured folder of images. For your first AI model, it’s best to use the first, simplest option.
Select at least five images of the same subject from your hard drive, either individually or by holding down Ctrl or Cmd as you click them. Ideally, these should have variations in background, lighting, or position to help Lobe identify the important parts. I’ve chosen photos of our neighborhood fox.
Enter a descriptive label for the first image, which in our example is “fox.” Lobe will save this label, so you can quickly apply it to the other images in the dataset. Right-click a picture if you need to edit the label or delete the image.
Next, import another set of images of a different but related subject. I chose photos of my dog for Lobe to distinguish from those of the fox. Again, label the first image with a descriptive tag, then apply the same label to the other shots. You can optionally repeat the process for additional sets, but you only need two to create a model.
3. Train Your Machine Learning Model
Once you’ve created at least two labels and applied them to at least five images each, Lobe will automatically start training your machine learning model. You’ll hear a confirmation sound when the process is complete.
Click the Train option in the left-hand column to view the results. Hover your mouse over an image and you should see a message saying: “Correct Prediction. Your Lobe is correctly predicting this image is [name of label].”
You can test if your model works by importing another image, to see if Lobe predicts the correct label. Click Play on the left, then either drag and drop a picture into the app, or click Import.
If Lobe correctly predicts the label for the imported image, click the green tick button; if not, click the red button. Continue adding images to train your AI model to recognize different variations of the subject. Microsoft suggests using between 100 and 1,000 images per label, depending on the complexity of the task.
4. Optimize Your Machine Learning Model
If Lobe keeps making incorrect predictions, there are several ways you can make your machine-learning model more reliable.
Go into the Train section, click the View button in the top-right corner and choose Incorrect First. This will show you which images are confusing Lobe most frequently. Import more variations of these mislabeled images to mark as correct or incorrect. This will make future predictions more accurate.
Lobe will always predict one of your labels, even if the image you import doesn’t contain related content. To prevent misidentification, add placeholder images and label them None, so your model isn’t forced to choose between wrong answers.
If you’re working with a large dataset and experiencing lots of incorrect predictions, you can force Lobe to train your model more thoroughly. Click the three-line menu button in the top-left corner, choose Optimize Model, and click Optimize.
5. Export Your Lobe Model to Use in an App
Although you can play around with Lobe for fun, it also lets you export your machine learning model in industry-standard formats, so you can use it in an app you’re developing.
You can export datasets as TensorFlow Lite, for use in Android and Internet of Things apps; as Core ML to develop iOS, iPad, and macOS apps; and as TensorFlow 1.15 SavedModel, for use in applications coded in the Python language.
Click the menu button in the top-left corner, choose Export, and select your preferred format. Before saving your model’s files or code, you’ll be given the option to optimize your model. Lobe also has its own API (application programming interface) for running exported models in Python and .NET.
Don’t worry if those options sound too advanced for your level of programming expertise, because Lobe saves your project automatically. If you need technical help and advice, you can visit the Lobe Community subreddit.
All You Need Is Lobe
Microsoft Lobe offers a simple visual way to create a basic machine learning model, without needing to worry about code. You can use it to classify images of anything you want and try capturing shots from your webcam too.
If experimenting with Lobe makes you eager to learn more about machine learning, you’ll find lots of free courses and tutorials online to help you develop your skills and knowledge.