Lobe Help

Everything you need to know to train great machine learning models with Lobe.

How do I use my model?

How do I use my model?

chevron-down

Your model is a collection of files that other programs can load to run predictions. These files store both the structure of your model and the weights that are a result of training.


You can use the model files locally in your app or in most major cloud platforms to create an API. Lobe also hosts your model as a local API to help kickstart your app development.


Where can I use my model?

Where can I use my model?

chevron-down

We are continually expanding the ways you can use your model. Current recommendations:


Local Python app or hosted on Azure, Google Cloud, or AWS

Export your model as a TensorFlow 1.15 SavedModel. TensorFlow’s SavedModel is the standard format used in Python applications running TensorFlow 1.x, and can be deployed in TensorFlow web services to run inference on the cloud as an API.


Apple iOS

Export your model as Core ML to develop iOS, iPad, and Mac apps.


Android or Raspberry Pi

Export your model as TensorFlow Lite to be used for mobile and IoT applications.


ONNX

Export your model as ONNX for cross-compatible applications, including edge devices.


Web Applications

Export your model as TensorFlow.js for browser-based web or server-side Node applications.


Local API

Lobe will host a local API to call your model via a REST endpoint. Use this option to mock a service that runs predictions while developing your app.

To run the local API:

  1. Capture an input image as a base64 string. Make sure the base64 string doesn't include the 'data:image/jpeg;base64,' prefix that sometimes is added.
  2. Do a POST request to the locally hosted API for your project with the details from the export sheet. Here is an example of what to request:
POST http://localhost:38100/predict/project-uuid-from-export-window
Content-Type: application/json
{
"inputs": {
"Image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCABkAGQDASIAAhEBAxEB/8QAHAAAAQQDAQAAAAAAAAAAAAAABwAEBQYCAwgB/8QAOhAAAQMDAgMGBAQFAwUAAAAAAQIDBAAFERIhBjFBBxMiUWFxFBWBkSOxwdEIMkJSoWJy4TNDY7Lx/8QAGAEAAwEBAAAAAAAAAAAAAAA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QD4FpyNSsKOAcnf1pUqEQIbxu+L7mqW+QlWlKcgAb4GwHSrIFFNpdeSAFDCNvLUR+gpUq0ugfSl8XuOswlhDqx368OHVuev6VRpDypc2DFdA7tKg3tkEgasZ9qVKlZmEy3Ro6W9IZThISg7k6h67+g5VNtRGkuLDZU3pQT4cDPp7UqVUiuBDbDjtFtKSjZwb+nP9q8fjNpTsVAuFJUc+4pUqwpi60nIIzkjJpUqVMY//9k="
}
}

Spreadsheets and local images

Export your model as a TensorFlow SavedModel to use with our helper code for running predictions on spreadsheets of image URLs or local image files.


Can I see example code?

Can I see example code?

chevron-down

When you export a model, the exported folder contains example code to use your model:

  • example/ directory: Lobe provides an example with a readme on how to load and run your model in the chosen export format.
  • signature.json file: the signature contains information about your model that your app will generally have to provide when loading the model. This includes details about the exposed inputs and outputs, their data types and shapes, and the labels corresponding to predicted confidence outputs. See the example/ directory for code on how to load and use the signature.


Can I see some starter projects?

Can I see some starter projects?

chevron-down

Lobe provides example projects on GitHub to help you get started.


iOS

A sample iOS application running the exported Core ML model: https://github.com/lobe/iOS-bootstrap


Android

A sample Android application running the exported TensorFlow Lite model: https://github.com/lobe/android-bootstrap


Web

An example React web application that runs predictions on images from your webcam: https://github.com/lobe/web-bootstrap


Raspberry Pi

An example Python application that runs predictions on a Raspberry Pi: https://github.com/microsoft/trashclassifier


Does Lobe have an API?

Does Lobe have an SDK?

Does Lobe have an SDK?

chevron-down

Yes! Lobe provides a Python SDK and .NET SDK to run the exported models.


Train your app with Lobe
Download