#Event – 2×1 on #AI: Anomaly Detection at Microsoft Reactor and ML.Net @MississaugaNetU

Photo by Sachin C Nair on Pexels.com
Buy Me A Coffee

Hi!

Quick post to remember about a couple of events where I’ll participate.

1st, this Thursday at Microsoft Reactor in Toronto.

Building an Anomaly Detector System with a few or no lines of code

November 21, 2019 | 5:00PM – 7:00PM

Reactor Toronto
MaRS Centre, Heritage Building 101 College Street, Suite 120
Toronto Ontario M5G-1L7
Canada

More Information https://www.microsoftevents.com/profile/form/index.cfm?PKformID=0x8330114abcd

And, I’m happy to go back with my friends from the Mississauga DotNet User Group.

Machine Learning Galore!

Thursday, December 19, 2019
6:00 PM to 8:00 PM

More Information https://www.meetup.com/MississaugaNETUG/events/266518936/

Happy Coding!

Greetings @ Toronto

El Bruno

Advertisements

#Event – Resources used during the #GlobalAINight at @MarsDD

Hi!

It was a placer to share some amazing time with the Metro Toronto .Net User Group. Last night was also a special one, we hosted the event at the amazing @MarsDD it was great to have a huge group interested in Artificial Intelligence.

As usual, it’s time to share the resources of the event

Official Resources https://aka.ms/AA60hn1

This includes Workshops like

  • Creating applications that can see, hear, speak or understand – using Microsoft Cognitive Services
  • Learn how to train high accuracy machine learning models using automated machine learning
  • Crash course on building and accelerating deep learning solutions
  • And more.

It also includes a set of materials around Automated Machine Learning (AutoML).

And of course, my materials.

Slides

Source Code: https://github.com/elbruno/events/tree/master/2019%2009%2005%20Global%20AI%20Night

Happy Coding!

Greetings @ Toronto

El Bruno

Resources

Tweets

#RaspberryPi – How to install #DotNetCore in a #RaspberryPi4 and test with #HelloWorld (of course!)

Hi!

During the next couple of months, I’ll be sharing some amazing experiences around AI. Some of these experiences includes IoT devices like a Raspberry Pi, and of course some Machine Learning.Net (ML.Net). Because ML.Net is built with .Net Core, it makes sense to share the 5 simple steps you need to do to install .Net Core in a Raspberry Pi.

Of course, my 1st try was to navigate to the official .Net page (see references), which automatically detect my Linux distro and proposes a set of x64 SDKs.

raspberry pi 4 .net tutorial page with linux distribution options

I’m completely sure that I’m working in a 32 bits environment, however I’ll double check this with the following commands

sudo apt-get install lshw
lshw

After installing lshw I confirm that I’m in a 32 bit environment

raspberry pi 4 lshw information on 32 bit environment

Bonus: lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work).

Now I need to navigate to the download page to download the specific Linux 32-bit version (see references).

Once I got the image downloaded its time to extract the file on a specific folder. I’ve created a folder named “dotnet” with the following command

sudo mkdir -p dotnet

And to extract the image from the Downloads folder

sudo tar zxf dotnet-sdk-2.2.401-linux-arm.tar.gz -C
/home/pi/dotnet/

Let’s create a symbolic link to the extracted binaries

sudo ln -s /home/pi/dotnet/dotnet /usr/local/bin

And it’s done! Let’s invoke the .DotNet help command to test it

raspberry pi 4 .net core 2.2 installed and test dotnet help

Now we can follow the steps of [.NET Core on Raspberry Pi, see references] to create a Console Application and to test the device.

To create a new console App

dotnet new console
raspberry pi 4 .net core 2.2 create new console app

And test the app

sudo dotnet run
raspberry pi 4 .net core 2.2 console app run

We can publish the app for linux / raspberry pi

sudo dotnet publish -r linux-arm

And copy the generated folder to be used in another device

./bin/Debug/netcoreapp2.2/linux-arm/
raspberry pi 4 .net core 2.2 console app build and publish folder to reuse

So next steps will be some other tests with Raspberry Pi and .Net Core. And the following image is a big teaser of this

raspberry pi 4 .net core 2.2 console app edit in Visual Studio Code

Happy coding!

Greetings @ Toronto

El Bruno

References

#NetUniversity – Introducción a Machine Learning (Curso Online)

Buenas!

Existen muchos recursos para comenzar a aprender Machine Learning. Sin embargo, suele ser complicado elegir uno que realmente se adapte a nuestro perfil, y que nos permita aprender de forma coherente y concisa los principios de Machine Learning. Si trabajas con tecnologías Microsoft o eres un programador .Net, este curso es para ti.

Durante este curso veremos los conceptos principales que explican el estado actual de Machine Learning; y aprenderemos utilizando ML.NET (Machine Learning.Net ). ML.Net es un conjunto de herramientas que ha alcanzado de forma oficial su versión Release y que será la base del aprendizaje de Machine Learning. Veremos escenarios para aprendizaje supervisado y no supervisado, escenarios de análisis de sentimientos de texto, escenarios de integración con otras tecnologías de ML, como ONNX o TensorFlow, y mucho más.

Introducción a Machine Learning

Cuando termines el curso, estoy 100% convencido que podrás aplicar estos conocimientos para encontrar los mejores escenarios de ML en tus investigaciones o tu trabajo del día a día.

Y por cierto, tengo algunos cupones de descuento, si los quieres contáctame! Y puedes revisar algunos de mis posts de Machine Learning.Net aquí.

Saludos @ Toronto

El Bruno

#Training – @_NetUniversity, excelentes cursos online de Azure, .Net, y más. Y en las próximas semanas terminaré uno de #MachineLearning para programadores .Net!

Buenas!

Hoy toca volver a escribir en Español, y es para presentar una plataforma excelente de aprendizaje:

Net-University

Programación, bases de datos, .Net, JavaScript, Azure, Windows, Linux y más. En Net University te brindamos entrenamiento de alta calidad con profesionales experimentados, al mejor costo / beneficio que puedas encontrar.

Net University

Actualmente hay 3 cursos disponibles y estamos terminando varios más, incluido uno de Machine Learning para .Net developers, ¡que saldrá a la luz a final de Junio!

Mas información en este link

Saludos @ Burlington

El Bruno

#Event – Resources used on the Visual Studio 2019 Launch Party event on [Machine Learning.Net] #VS2019 #MLNET

Hi!

Another post-event post, this time with a big thanks to the Mississauga .Net User Group who organized the Visual Studio 2019 Launch Party.

I was part of the team sharing some demos, and I mostly speak about Machine Learning.Net.

As usual, now it’s time to share slides, code and more.

Source Code in GitHub https://github.com/elbruno/events/tree/master/2019%2004%2027%20GAB%20MLNet

And some Machine Learning.Net resources:

Resources

Happy coding!

Greetings @ Toronto

El Bruno

#MLNET – How to use the AutoML API in a Console App

Hi !

In my last posts I was testing AutoML using the Model Builder inside Visual Studio and also the CLI commands. There is also an API to use this in a .Net app, and the usage is very simple.

It all start, of course, adding the [Microsoft.ML.AutoML] nuget package

I read the documentation in [How to use the ML.NET automated machine learning API], and I created the following sample using the same data as in my previous posts.

The final result displays the results for each one of the tests and showcase the top 3 ranked models. This time LightGBM Trainer is one more time the best trainer to choose.

There is a full set of samples in the Machine Learning .Net Samples repository. I’ve reused some classes from the Common folder.

The complete source code is available https://github.com/elbruno/Blog/tree/master/20190516%20MLNET%20AutoML%20API

Happy Coding!

Greetings @ Toronto

El Bruno

References

#MLNET – Are you a Command line user? MLNet CLI is great for some AutoML train tasks!

Hi !

Yesterday I wrote about how easy is to use Model Builder to create Machine Learning models directly from data inside Visual Studio.

If you prefer to work with command line interfaces, Machine Learning.Net AutoML also have a CLI interface and with a couple of commands, you can get some amazing results.

So, for this test I follow the tutorial [Auto generate a binary classifier using the CLI] and make some changes to the original command

> mlnet auto-train --task binary-classification --dataset "yelp_labelled.txt" --label-column-index 1 --has-header false --max-exploration-time 10

I’m using the same set of data I used yesterday and, my command is

mlnet auto-train --task regression --dataset "AgeRangeData03_AgeGenderLabelEncodedMoreData.csv" --label-column-index 2 --has-header true --max-exploration-time 60

The output is also interesting: it suggest to use a FastTree Regression trainer

My yesterday test using the IDE suggested a LightBGM regression trainer.

So, I decided to run the CLI one more time with some more processing time. This time the result is also a FastTree Tegression trainer.

Unless you need to use Visual Studio, this option is amazing for fast tests and you can also use the generated projects!

Happy Coding!

Greetings @ Toronto

El Bruno

References

#MLNET – Testing Machine Learning Model Builder preview. It’s so cool !

Hi !

Last week Machine Learning.Net 1.0 was officially announced during Build 2019, and the ML.Net team also announced a set of ML tools related to ML.Net.

One of the most interesting ones is Machine Learning Model Builder. You can get more information about Model Builder in the official website.

ML.NET Model Builder provides an easy to understand visual interface to build, train, and deploy custom machine learning models. Prior machine learning expertise is not required. Model Builder supports AutoML, which automatically explores different machine learning algorithms and settings to help you find the one that best suits your scenario.

Machine Learning Model Builder

The tool is on Preview, but it’s still an amazing one to play around with ML. So I decided to give it a try with my small data set of kids, the one I use on the Machine Learning.Net demos.

The structure of my CSV file is very simple with just 3 columns: Age, Gender and Label.

However the first time I run the scenario I found the following error.

Inferring Columns ...
Creating Data loader ...
Loading data ...
Exploring multiple ML algorithms and settings to find you the best model for ML task: regression
For further learning check: https://aka.ms/mlnet-cli
|     Trainer                             RSquared Absolute-loss Squared-loss RMS-loss  Duration #Iteration      |
[Source=AutoML, Kind=Trace] Channel started
Exception occured while exploring pipelines:
Provided label column 'Label' was of type String, but only type Single is allowed.
System.ArgumentException: Provided label column 'Label' was of type String, but only type Single is allowed.
   at Microsoft.ML.CLI.Program.<>c__DisplayClass1_0.<Main>b__0(NewCommandSettings options)
   at Microsoft.ML.CLI.CodeGenerator.CodeGenerationHelper.GenerateCode()
Please see the log file for more info.
Exiting ...

Which makes a lot of sense, my Label column is a String and the Model Builder expects a Single data type. So, I updated my data file replacing the labels with numbers and I was ready for a 2nd test.

This time the training process started fine, however I noticed that using just a small training dataset didn’t trigger any comparing between different algorithms. So I created a much bigger training dataset, and now I got the training process up and running.

At the end the results are the ones below. And it’s very interesting. I do most of my demos using a MultiClass SDCA trainer and AutoML suggest me to use a LightGBM trainer. This will be part of my Machine Learning.Net speech for sure in the future.

You can download the Visual Studio extension from https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotnet/model-builder and remember that we can talk about this on the Visual Studio 2019 event with the Mississauga .Net User Group in a couple of weeks!

Happy Coding!

Greetings @ Toronto

El Bruno

#Event – Resources for the sessions about #DeepLearning and #CustomVision at the @ChicagoCodeCamp

Hi!

Another post-event post, this time with a big thanks to the team behind one of the most amazing event I’ve been this year: Chicago CodeCamp.

I had the chance to meet a lot of amazing people, to learn a lot during the sessions and also to visit the great city of Chicago.

As usual, now it’s time to share slides, code and more.

Deep Learning for Everyone? Challenge Accepted!

Let’s start with the Deep Learning resources


Demos Source Code: https://github.com/elbruno/events/tree/master/2019%2005%2011%20Chicago%20CodeCamp%20Deep%20Learning

Session: How a PoC at home can scale to Enterprise Level using Custom Vision APIs

And also the [How a PoC at home can scale to Enterprise Level using Custom Vision APIs] resources

Demos Source Code: https://github.com/elbruno/events/tree/master/2019%2005%2011%20Chicago%20CodeCamp%20CustomVision

And finally, some Machine Learning.Net, Deep Learning and Custom Vision resources:

My posts on Custom Vision and ONNX

  1. Object recognition with Custom Vision and ONNX in Windows applications using WinML
  2. Object recognition with Custom Vision and ONNX in Windows applications using WinML
  3. Object recognition with Custom Vision and ONNX in Windows applications using Windows ML, drawing frames
  4. Object recognition with Custom Vision and ONNX in Windows applications using Windows ML, calculate FPS
  5. Can’t install Docker on Windows 10 Home, need Pro or Enterprise
  6. Running a Custom Vision project in a local Docker Container
  7. Analyzing images in a Console App using a Custom Vision project in a Docker Container
  8. Analyzing images using PostMan from a Custom Vision project hosted in a Docker Container
  9. Building the CustomVision.ai project in Docker in a RaspberryPi
  10. Container dies immediately upon successful start in a RaspberryPi. Of course, it’s all about TensorFlow dependencies
  11. About ports, IPs and more to access a container hosted in a Raspberry Pi
  12. Average response times using a CustomVision.ai docker container in a RaspberryPi and a PC

Windows 10 and YOLOV2 for Object Detection Series

See you next one in Chicago for some Deep Learning fun!

Happy coding!

Greetings @ Toronto

El Bruno