#Onnx – Repositories for Onnx models in #Azure AI Gallery and #GitHub

Hi!

In my Machine Learning and WinML sessions I always share some minutes talking about ONNX. One of the most common topics related to ONNX is where to find ONNX models online. Some kind of Market Place. I usually recommend 2 options

In Azure AI Gallery, in the Models section https://gallery.azure.ai/models we can search trough several models. Those models are already prepared to be used on Windows 10, using WinML. In the references section I share some of my posts about models in Azure AI Gallery used to perform object detection.

Another option is the MODELS repository in the ONNX GitHub account https://github.com/onnx/models. There are several models sorted by categories, and each model have the download link to the Onnx file, references to the official documentation and more.

Models

Happy Coding!

Saludos @ Burlington

El Bruno

References



Advertisements

#Onnx – Repositorios de modelos Onnx en #Azure AI Gallery y #GitHub

Buenas!

Cuando hablo de ONNX en las sesiones de Machine Learning y WinML, siempre surgenpreguntas relacionadas con repositorios donde encontrar modelos ONNX. Por logeneral siempre recomiendo 2 opciones

En la sección MODELS en Azure AI Gallery https://gallery.azure.ai/models podemos encontrar muchos modelos que ya están preparados para ser utilizados en Windows 10. En las referencias he dejado un link a algunos posts que he escrito sobre modelos de detección de objetos en imágenes en Azure AI Gallery.

Otra opción es el repositorio MODELS en la cuenta de GitHub de Onnx https://github.com/onnx/models. En el repositorio tenemos varias categorías de tipos de modelos y cada uno de ellos tiene el link de descarga del archivo Onnx, documentación sobre tipos de datos de in y out y mucho más.

Happy Coding!

Saludos @ Burlington

El Bruno

References

#WinML – Alternatives to #Yolo for object detection in #ONNX format

Hi!

A few days ago I commented with some colleagues the example of using TinyYolo In a UWP Application. Now it is a very task, because we can use a ONNX model in an Windows 10 application.

Note: The App can be an UWP app or a standard Win32 app, like, for example, the classic Windows forms.

Well, in the middle of the conversation, someone ask the following question, which is also a classic in ML events and talks:

Is there an AI model Marketplace for Windows?

The answer is yes. And although it’s not a Marketplace Models only, at Azure AI Gallery (Https://gallery.azure.ai/models) We can find many ONNX models, already ready to be used in Windows 10.

01 azure ai gallery home

On the main page we can see the different models organized by categories and by relevance. If we go into the detail of one of the models, we will see the details of the same, Like this As the option of downloading the file ONNX

02 azure ai gallery Alex Net details

Finally, according to the documentation of the model, we will be able to access your GitHub repository, Paper Where it explains the same, and other options.

03 AlexNet paper

So, you know, if you want to add some AI capabilities in your Apps, the Azure AI Gallery is a #MustReview Place to look!

Happy Coding!

Greetings @ Toronto

El Bruno

References

Windows 10 and YOLOV2 for Object Detection Series

#WinML – Alternativas a #TinyYolo para reconocimiento de objetos en formato #ONNX

Buenas!

Hace unos días comentaba con unos colegas el ejemplo de utilización de TinyYolo en una UWP. Ahora es muy simple poder utilizar un modelo de ML en formato ONNX y utilizarlo en una aplicación en Windows 10.

Nota: la app puede ser UWP o una app Win32 estándar, como, por ejemplo, los clásicos Windows Forms.

Pues bien, en el medio de la conversación, surgió la pregunta que mas respondo en eventos y charlas:

¿Hay un Marketplace de modelos de AI para Windows?

La respuesta es SI. Y aunque no es un marketplace solo de modelos, en Azure AI Gallery (https://gallery.azure.ai/models) podemos encontrar muchos modelos ONNX, ya preparados para ser utilizados en Windows 10.

01 azure ai gallery home

En la página principal podemos ver los diferentes modelos organizados por categorías y por relevancia. Si entramos al detalle de uno de los modelos, veremos los detalles del mismo, asi como la opción del descargar el archivo ONNX

02 azure ai gallery Alex Net details

Finalmente, de acuerdo con la documentación del modelo, podremos acceder a su repositorio de GitHub, al paper donde se explica el mismo, y otras opciones.

03 AlexNet paper

Así que, ya sabes, si quieres agregar algunas capacidades de AI en tus apps, la Azure AI Gallery es un #MustReview place donde buscar!

Happy Coding!

Saludos @ Toronto

El Bruno

References

Windows 10 and YOLOV2 for Object Detection Series

#WinML – Updated demo using Tiny YOLO V2 1.2, Windows 10 and YOLOV2 for Object Detection Series

Windows 10 and YOLOV2 for Object Detection Series


Hi!

There is a new Tiny YOLO V2 version in Azure AI Gallery

Tiny YOLOv2 1.2

I’ve updated my sample in GitHub to use this new version

https://github.com/elbruno/Blog/tree/master/20180806%20UwpMLNet%20TinyYoloV2%201.2

And it seems that Windows Insiders, are still having issues loading ONNXs models. My current build is 17730.1000

I1.png

Happy Coding!

Greetings @ Toronto

El Bruno

References

#WinML – Demo actualizada para utilizar Tiny YOLOv2 1.2, Windows 10 and YOLOV2 for Object Detection Series

Windows 10 and YOLOV2 for Object Detection Series


Buenas!

Ya tenemos disponible una nueva version de Tiny YOLO V2 en Azure AI Gallery

Tiny YOLOv2 1.2

Así que he actualizado el sample en GitHub para que utilice esta nueva version

https://github.com/elbruno/Blog/tree/master/20180806%20UwpMLNet%20TinyYoloV2%201.2

Y solo recordar que la carga de modelos ONNX parece que sigue sin funcionar en las versiones de Windows Insiders, en mi caso la build 17730.1000

I1.png

 

Happy Coding!

Saludos @ Toronto

El Bruno

References

#WinML – How to create a #Windows10 App and use #TinyYOLOV2 for object detection (the complete series)

Hi !

Windows 10 and TinyYOLOV2 for Object Detection Series

The complete example in GitHub

https://github.com/elbruno/Blog/tree/master/20180709%20UwpMLNet%20TinyYoloV3

Happy Coding!

Greetings @ Toronto

El Bruno

References

#MLNET – Export Machine Learning.Net models to #ONNX format

Hi!

Machine Learning.Net has a new release. In this version 0.3, there are several very interesting features. Cesar De la Torre explains in a very detailed way all these new features (see references). I’ve had some extra time these days and I’ve been trying something that I find very interesting

Export Machine Learning.Net models to #ONNX format

As always the best thing describe this it with a couple of lines of code

  • Up to Line 28, the Console APP creates a pipeline, and trains it to have a ML.Net model.
  • In the following lines, using a OnnxConverter, I export the model to ONNX.

The documentation of OnnxConverter and examples of ML.Net detail more complex scenarios where for example you define which columns are included or excluded. If we open the file Onnx, it’s interesting to see how a simple pipeline is represented as this example

01

Happy Coding!

Saludos @ Toronto

El Bruno

References

My Posts

#MLNET – Exportando modelos de Machine Learning.Net a formato #ONNX

Buenas!

Machine Learning.Net tiene un nuevo release y en esta versión 0.3, hay varias features interesantes. En el post de Cesar De la Torre se comentan estas nuevas features (ver referencias). Yo he tenido un hueco en estos días y me he dedicado a probar algo que me parece muy interesante

La capacidad de exportar modelos Machine Learning.Net a formato ONNX.

Como siempre lo mejor es explicarlo con un par de líneas de código

  • Hasta la línea 28, la Console App crea un Pipeline, y lo entrena para tener un Modelo ML.Net.
  • En las siguientes líneas, utilizando un OnnxConverter, exporto el modelo a ONNX.

La documentación de OnnxConverter y los ejemplos de ML.Net detallan escenarios más complejos donde por ejemplo se definen que columnas se incluyen o excluyen. Si abrimos el archivo Onnx, es interesante ver como se representa un pipeline simple como el de este ejemplo

01

Happy Coding!

Saludos @ Toronto

El Bruno

References

My Posts

#WinML – How to convert Tiny-YoloV3 model in CoreML format to Onnx and use it in a #Windows10 App

Windows 10 and YOLOV2 for Object Detection Series


Hi!

In today’s post I’ll share some experience on how to download the latest version of Tiny-YoloV3 and use it in the UWP App that I created in previous posts. Important, the Tiny-YoloV2  model I’ve used in previous posts was in Onnx format, and it was downloaded from Azure AI Gallery.

We can download Tiny-YoloV3 from the official site, however I will work with a version that is already compiled in CoreML format, CoreML format is usually used in iOS apps (see References).

Well, to convert the model of CoreML To Onnx, we will use Visual Studio Tools For Ai. And the next set of software

Once all the software is installed, we can follow the step by step of [Ai Converting Models To ONNX] to convert our model. However, the road is not as simple as it seems. The 1st thing we can find are errors like the following

01 thanks Python

Problems with Python, in my case had several versions of Python installed, but the IDE had no marked as [Default]. From the panel [Pythin Environments] You can fix this

01 1 Python environments

Next Problem I need some configuration on my part, it was related to Prerequisites for conversion. It all starts with [Missing Package WinMLTools]

—————————

Error

—————————

Missing package WinMLTools, please check details in output window.

—————————

OK  

—————————

 

Traceback (most recent call last):

  File “C:\Users\<Bruno>\AppData\Local\Microsoft\VisualStudio\15.0_e5344afb\Extensions\kzqekf1z.44v\RuntimeSDK\model\model_converter_cli.py”, line 76, in check_winmltools_installed

    import winmltools

ModuleNotFoundError: No module named ‘winmltools’

However After Of Investigate for a while, these are the 2 Packages I need to install

Microsoft ML Tool (winmltools)

pip3 install winmltools==0.1.0.5072

CoreML Tools

pip3 install “git+https://github.com/apple/coremltools@v0.8”

As always, 1st thing to do is update Python

03 upgrade pip.png

And now we can launch the conversion operation again

07 01 convert.png

And a few seconds later we already have our Tiny-YoloV3 in format Onnx

07 convert running

Because the model respects the Input/Output of the previous version, we only have to replace the file in our solution. I have added the new Onnx Just to have a little more control over the example.

08 Sol Onnx.png

As I have always updated the complete example in GitHub

https://github.com/elbruno/Blog/tree/master/20180709%20UwpMLNet%20TinyYoloV3

Happy Coding!

Greetings @ Toronto

El Bruno

References