Announcing ML.NET 1.1 and Model Builder updates (Machine Learning for .NET)
ML.NET is an open-source and cross-platform machine learning framework (Windows, Linux, macOS) for .NET developers.
ML.NET offers Model Builder Model Builder (a simple UI tool for Visual Studio) and CLI to make it super easy to build custom ML Models using AutoML.
Using ML.NET, developers can leverage their existing tools and skillsets to develop and infuse custom AI into their applications by creating custom machine learning models for common scenarios like Sentiment Analysis, Recommendation, Image Classification and more!.
Today we’re announcing ML.NET 1.1 which includes updates for ML.NET (v1.0 was released on May 2019) and Model Builder for Visual Studio.
Following are the key highlights:
Added support for in-memory ‘image type’ in IDataview: In previous versions of ML.NET whenever you used images in a model (such as when scoring a TensorFlow or ONNX model using images) you needed to load the images from files placed on a drive by specifying file paths. In ML.NET 1.1 you can now load in-memory images and process them directly.
For further learning read this ‘end-to-end scenario’ blog post describing a sample ASP.NET Core web app where the images are used in-memory. Images used in the sample app are directly received through Http requests, then processed by a TensorFlow model with ML.NET API code.
Additional samples using in-memory images:
New Anomaly Detection algorithm (in preview): Added a new Anomaly Detection algorithm named
SrCnnAnomalyDetectionto the Time Series NuGet package. This algorithm based on a Super-Resolution Deep Convolutional Network. One of the advantages of this algorithm is that it does not require any prior training. This contribution comes from the Azure Anomaly Detector team.
For further learning see this sample code for anomaly detection
New Time Series Forecasting components (in preview): This new feature added to the Time Series NuGet package allows you to implement a time series forecasting model based on
Singular Spectrum Analysis(SSA). It is named in ML.NET as
AdaptiveSingularSpectrumSequenceModeler. This type of time series forecasting prediction is very useful when your data has some kind of periodic component where events have a causal relationship and they happen (or miss to happen) in some point of time. For example, sales forecasts impacted by different seassons (Holiday-season, sales timeframe, weekends, etc.) or any other type of data where the time component is important.
For further learning see this sample code for forecasting
Additional enhancements and remarks:
- Upgrade internal TensorFlow version from 1.12.0 to 1.13.1
- Microsoft.ML.TensorFlow NuGet package has been upgraded from 0.12 to 0.13 (preview).
Bug fixing: For further learning on bug fixes released on v1.1 go to the ML.NET v1.1 Release Notes
Model Builder updates
This release of Model Builder adds support for a new scenario and address many customer reported issues.
New Issue Classification Template: This scenario enables a user to add support for classifying tabular data into many classes. This template uses multi-class classification which can be used for classifying data into 3+ categories. E.g You can use this template for predicting GitHub issues, customer support ticket routing, classifying emails into different categories and many more scenarios.
Improve Evaluate step: Evaluate step now shows more correct information about the top models explored. This was the most commonly requested fix reported by customers.
Improve code generation step: Improve instructions for easily consuming generated code by referring to the project names.
Address customer feedback: This release also address many customer reported issues around installation errors, usability feedback and stability improvements and more.
Planning to go to production?
If you are using ML.NET in your app and looking to go into production, you can talk to an engineer on the ML.NET team to:
- Get help implementing ML.NET successfully in your application.
- Provide feedback about ML.NET.
- Demo your app and potentially have it featured on the ML.NET homepage, .NET Blog, or other Microsoft channel.
Fill out this form and leave your contact information at the end if you’d like someone from the ML.NET team to contact you.
Get started with ML.NET and Model Builder for Visual Studio
Get started with ML.NET here.
Get started with Model Builder here.
Next, going further explore some other resources:
- Tutorials and resources at the Microsoft Docs ML.NET Guide
- Sample apps using ML.NET at the machinelearning-samples GitHub repo
- Model Builder feedback
Thanks and happy coding with ML.NET!
The ML.NET Team.
This blog was authored by Cesar de la Torre, Pranav Rastogi plus additional contributions of the ML.NET team
ML.Net is fantastic !!!
I really liked the APIs and coding in C# using ML.Net. In my use-case, I am looking for a ranking algorithm (LTR) example using ML.Net and C#. I see it supports ranking, but no example returning a ranked list of items. I see example using recommendation algorithm, but none for Ranking. A C# code example using ML.Net and ranking algorithm will be very beneficial in my project. I am waiting on this for a project.
@Gangadhar – Thanks for your feedback! – We’re actually working on a sample app targeting RANKING. It’ll be soon published at the ML.NET Samples repo. In the mean time, you can take a look to Tests using the Ranking trainer in the ML.NET repo, ok?
Thank you very much. Looking forward to the ranking sample.
how to consume the model in android and IOS ?
@john – Currently, ML.NET doesn’t support ARM processors which are usually the ones used by iOS or Android devices. We will support ARM in upcoming versions. There are however two workarounds you can do today:
1. Export your model to ONNX and run it on iOS or Android.
2. You can get the results/predictions of an ML.NET model running in the server side, let’s say in an ASP.NET Core WebAPI service and show it in the mobile app.
Hope that helps.
Is ML.NET something we could use with Unity for using machine learning for game development?
Yes it’s possible to use ML in UNITY with C#. I used in one of my Augmented Reality projects with Image Classification and Localisation and the results are promising. Keep in mind I needed it for real time image processing on android so I sent data from unity to C# Console app for processing.
There are two ways you can build a custom model:
1. You can generate a custom model using model builder
2. You can use Alturos.Yolo C# wrapper (Which is VERY FAST) if you are need image classification
Yolo stands for “You Only Look Once”
I used .NET Sockets for communication between my C# console app (server which does ML) a and my client app in Unity which sends images in bytes and receive output.
As for using it in unity script by itself I strongly doubt it.
Is it possible to build the model from Microsoft SQL Server 2016 database? When I try to build I see only 2 options SQL Server and file.
Here is the case where I am trying to implement AI –
– Read the data from PDF and search for relevant text, if found enter it into a table (used C# and R)
– Now data is ready, I want to make predictions depending on input pdf file
– Predictions will be like eligible for scolorship / not eligible
Any help in how to implement this will he helpful.