Surface Duo Blog

2023 year in review

Hello Android developers, 2023 was the year that machine learning and artificial intelligence really became mainstream, and we covered both topics with a focus on Android implementations. We published series on using the ONNX machine learning runtime, building Android apps with Microsoft Graph, and tutorials for Jetpack Compose ...

Use ONNX Runtime in Flutter

Hello Flutter developers! After recently reading about how Pieces.app uses ONNX runtime inside a Flutter app, I was determined to try it myself. This article shows a summary of the journey I took and provides a few tips for you if you want to do the same. Since we have FFI in Dart for calling C code and ONNX Runtime offers a C ...

Microsoft Build 2023 recap

Hello mobile developers, Microsoft Build 2023 took place last week, with a big focus on AI technologies. You can find the complete catalog of sessions on the Build website, but we’ve selected a few sessions below that cover topics of interest for mobile developers. The age of AI These sessions cover some of the high-level ...

Built-in model pre-processing with ONNX

Hello Android developers, Previously we looked at how to pre-process image inputs for an ONNX model using Kotlin. It’s useful to understand this process because the principles apply to any model that you wish to use. On the other hand, having to write boilerplate code for input processing can be tedious – it also means there’s...

Bringing ONNX models to Android

Hello Android developers, One of the advantages of the ONNX runtime is the ability to run locally on a variety of devices, including mobile devices. This means that your users get fast response times, but also comes with the need to respect mobile device limitations such as app size and the ability to support performance ...

ONNX runtime inputs and outputs

Hello Android developers, Last week we got an ONNX runtime demo running on Android, which classified the subject of images being streamed from the device’s camera. Setup required downloading a pre-trained model and adding it to the sample app on GitHub. This week we’re going to look into the details of preparing inputs for the ...

On-device machine learning with ONNX

Hello Android developers, This week we’re going to get started with on-device machine learning using the ONNX Runtime and check out an Android sample that identifies the objects using the camera video stream. What is ONNX? ONNX stands for Open Neural Network eXchange and is an open-source format for AI models. ONNX supports...