Skip to content
/

The Custom Vision service is one of the Azure Cognitive Services that is provided by Microsoft. With custom vision, you can train a model with your own image data. The portal provides a Prediction API for the trained model to classify an image you supply.

There can be reasons why you might not want to use the online REST endpoint and you could prefer an offline model.

To work with machine learning in .NET, we can use ML.NET. There are several tutorials how to use this framework. But none of them combine the use of the Bitmap class with a downloaded ONNX model from the custom vision portal.

In this article I will walk through the steps to set up an application to classify bitmaps using a custom vision model with ML.NET.

The Custom Vision service is one of the Azure Cognitive Services that is provided by Microsoft. With custom vision, you can train a model with your own image data. The portal provides a Prediction API for the trained model to classify an image you supply.

There can be reasons why you might not want to use the online REST endpoint. For example, when processing images from a video feed, performance, connectivity, security, and costs might be considerations why you could prefer an offline model.

To work with machine learning in .NET, we can use ML.NET, an open source and cross-platform framework. There are several tutorials how to use this framework. But none of them combine the Bitmap class with a downloaded ONNX model from the custom vision portal.

In this article I will walk through the steps to set up an application to classify bitmaps using a custom vision model with ML.NET.

read more...
/

When trying to have an application work with an ONNX model I downloaded from the Microsoft Custom Vision portal, I got the following exception:

TypeInitializationException: EntryPointNotFoundException: Unable to find an entry point named 'OrtGetApiBase' in DLL 'onnxruntime'.

Searching for the error online did not yield any solutions.

After solving the problem, I wanted to share the solution for anyone else running into the same exception.

When trying to have an application work with an ONNX model I downloaded from the Microsoft Custom Vision portal, I got the following exception:

System.TypeInitializationException: 'The type initializer for 'Microsoft.ML.OnnxRuntime.NativeMethods' threw an exception.'

EntryPointNotFoundException: Unable to find an entry point named 'OrtGetApiBase' in DLL 'onnxruntime'.

Searching for the error online did not yield any solutions.

After solving the problem, I wanted to share the solution for anyone else running into the same exception.

read more...
/

Recently, I was using a YAML file for storing some data for a pet project. To work with this YAML in a .NET application, I use the excellent YamlDotNet library by Antoine Aubry.

One of my properties was a URL. Deserializing went fine, but when serializing back to a YAML file, things were not going as intended.

In this short article, I will explain how I did fix this.

Recently, I was using a YAML file for storing some data for a pet project. To work with this YAML in a .NET application, I use the excellent YamlDotNet library by Antoine Aubry.

One of my properties was a URL. Deserializing went fine, but when serializing back to a YAML file, things were not going as intended.

In this short article, I will explain how I did fix this.

read more...
Filed under C#
Last update:
/

Using Docker images for your Azure web app is not brand-new functionality. But if you want to deploy your container-based web app using ARM templates and use your own Azure container registry, you might discover it's not as straightforward as you might think.

In this article we will walk through the steps how we can make a connection to the container registry. In the end we will also make sure we do not have to pass along the password during the deployment.

Using Docker images for your Azure web app is not brand-new functionality. But if you want to deploy your container-based web app using ARM templates and use your own Azure container registry, you might discover it's not as straightforward as you might think.

In this article we will walk through the steps how we can make a connection to the container registry. In the end we will also make sure we do not have to pass along the password during the deployment.

read more...
Filed under Azure
Last update:
/

These times should not prevent us from sharing knowledge and keep learning about great new technologies. For this, Info Support organized the lockdown lectures.

I was honored to take part in this series and have people learn about the Open Application Model (OAM) and the Distributed Application Runtime (Dapr).

Here I share with you the recording and slides.

These times should not prevent us from sharing knowledge and keep learning about great innovative technologies. For this, Info Support organized the lockdown lectures.

I was honored to take part in this series and have people learn about the Open Application Model (OAM) and the Distributed Application Runtime (Dapr).

read more...