#Event – Resources used on the Azure AI Fundamentals, intro to #AzureML @conosurtech

Buy Me A Coffee

Hi !

Amazing session yesterday with my friends from ConoSurTech, Fernando, Ivana y Pablo. We had a great session with a high level overview around Azure Machine Learning, as part of the “Diplomado de AI Fundamentals 2020

Diplomado de AI Fundamentals 2020

El diplomado consiste en clases online dictadas a partir del 20 de Octubre de 2020. Las clases son dictadas los días Martes y Jueves a partir de las 18hrs (GMT-3), junto a entrevistas con líderes de productos y comunidades. El diplomado recorrerá los temas que forman parte de la certificación AI-900 Artificial Intelligence Fundamentals sumado a los últimos lanzamientos realizados por Microsoft en el mes de Septiembre. 

So, as usual now is the time to share slides, and links. No Code this time, so you are going to avoid some Copy & Paste.

Slides

Links

A very long list here…

Personal Note

It was a fast session, with over +100 viewers, and … so many topics to talk ! I prepared a full MLOps pipeline to show, I was planning to code from scratch a Jupyter Notebook, and more … we didn’t have time. This comment resume it all:

Recording

Resources

#Event – Resources used on my session for the @netcoreconf

Buy Me A Coffee

Hi !

Another huge and amazing events from my friends at the @netcoreconf, perfect excuse to talk about python, machine learning, computer vision and more. This one was also tricky, no slides, just code during 50 min so here are some related resources.

Code

The code used during the session is available here: https://github.com/elbruno/events/tree/main/2020%2010%2003%20Netcoreconf%20Virtual

Session Recording

Resources

#Event – Resources used on “Getting Started with Machine Learning .NET” for the Central Ohio .NET Developer’s Group (@CONDG)

Buy Me A Coffee

Hi !

Great session yesterday with Matthew and the Central Ohio .NET Developer’s Group (CONDG). And the excuse was to talk about Machine Learning .Net.

As usual, now it’s time for slides and code

Slides

Code

The code used during the session is available here: https://github.com/elbruno/events/tree/main/2020%2009%2024%20CONDG%20MLNet

Session Recording

(I’ll update this block when the recording is available!)

Resources

#VS2019 – ML.NET Model Builder GPU vs CPU test: 4 times faster !

Buy Me A Coffee

Hi !

Yesterday I wrote about the new options that we have to train models in ML.Net Model Builder. The main new is that we have the option to use our GPU to train models.

Quick recap, Model Builder supports 3 specific training environments

  • Local (CPU)
  • Local (GPU)
  • Azure

Yesterday I tested train a small image recognition model using CPU and GPU and the training time were very similar. The image training set was small, and I also haven’t configured my GPU & CUDA environment, so I decided to raise my own bet and test with something a little more challenging.

For this new test, I’ll use a set of images from a Kaggle challenge [State Farm Distracted Driver Detection] (see references). This is a 1GB image set, 22424images, with ten categories.

Of course, I used Model Builder to train an Image Classifier scenario, here is a preview of the configuration:

CPU Training

This training scenario was much more resource heavy than yesterday easy test. The total time was 39.2 minutes. Here is more detail

Total experiment time : 2353.6729442 Secs
------------------------------------------------------------------------------------------------------------------
|                                                     Summary                                                    |
------------------------------------------------------------------------------------------------------------------
|ML Task: image-classification                                                                                   |
|Dataset: C:\Users\bruno\AppData\Local\Temp\5e873581-2dab-4d46-911d-cfc0a0455eb1.tsv                             |
|Label : Label                                                                                                   |
|Total experiment time : 2353.6729442 Secs                                                                       |
|Total number of models explored: 1                                                                              |
------------------------------------------------------------------------------------------------------------------

GPU Train

Using the GPU, we have 1/4 time over CPU! 9.6 minutes.

Total experiment time : 581.1946062 Secs
------------------------------------------------------------------------------------------------------------------
|                                                     Summary                                                    |
------------------------------------------------------------------------------------------------------------------
|ML Task: image-classification                                                                                   |
|Dataset: C:\Users\bruno\AppData\Local\Temp\cccb2b3f-dbce-45e5-b17e-872b6cc3f116.tsv                             |
|Label : Label                                                                                                   |
|Total experiment time : 581.1946062 Secs                                                                        |
|Total number of models explored: 1                                                                              |
------------------------------------------------------------------------------------------------------------------

Conclusion

GPUs are great for deep learning because the type of calculations they were designed to process are the same as those encountered in deep learning. Images, videos, and other graphics are represented as matrices so that when you perform any operation, such as a zoom-in effect or a camera rotation, all you are doing is applying some mathematical transformation to a matrix.

Even if you have a non-powerful GPU (like me!), you may want to give it a try when you are training a model. ML.Net Model Builder documentation includes a series of steps to configure a CUDA 10.0 environment, which is good enough for most NVIDIA Graphic Cards.

Happy coding!

Greetings

El Bruno

References

#VS2019 – ML.NET Model Builder GPU Support, awesome !

Buy Me A Coffee

Hi !

Machine Learning.Net (ML.Net) includes a visual / step-by-step option for Auto ML: Model Builder. Even if ML.Net is based on .Net Core, and we can use it on Windows, Linux or Mac; Model Builder is only available for Visual Studio 2019.

And, in the latest preview version, Model Builder supports 3 specific training environments

  • Local (CPU)
  • Local (GPU)
  • Azure

And as you can imagine, if you have a decent GPU, the 2nd option is a must. So, let’s have a review for this.

First step is to install the [ML.NET Model Builder GPU Support (Preview)] extension (see references).

This will take a couple of minutes, and it will add the GPU option to our Model Builder projects. Once we have the extension installed, when we create a new ML.Net Model Builder Scenario, we can choose for CPU, GPU, or Azure environment.

In each one, we can see the different options available.

For this test, I use a sample Image Recognition scenario with 24 images for 3 different labels: fish, flower and human. This is a very simple scenario and the RestNet will easily work on this.

CPU Train

So, the total time to train a Image Recognition model with my CPU is:

Total experiment time : 230.8386996 Secs

Here are some more details:

------------------------------------------------------------------------------------------------------------------
|                                                     Summary                                                    |
------------------------------------------------------------------------------------------------------------------
|ML Task: image-classification                                                                                   |
|Dataset: C:\Users\bruno\AppData\Local\Temp\81efe1ab-c776-4071-b0ea-b7c93c65b239.tsv                             |
|Label : Label                                                                                                   |
|Total experiment time : 230.8386996 Secs                                                                        |
|Total number of models explored: 1                                                                              |
------------------------------------------------------------------------------------------------------------------

GPU Train

So, the total time to train a Image Recognition model with my GPO is:

Total experiment time : 228.1201648 Secs

More Details

------------------------------------------------------------------------------------------------------------------
|                                                     Summary                                                    |
------------------------------------------------------------------------------------------------------------------
|ML Task: image-classification                                                                                   |
|Dataset: C:\Users\bruno\AppData\Local\Temp\727e5bf8-bbe0-4d13-9513-043453a06bec.tsv                             |
|Label : Label                                                                                                   |
|Total experiment time : 228.1201648 Secs                                                                        |
|Total number of models explored: 1                                                                              |
------------------------------------------------------------------------------------------------------------------

CUDA and GPU must be configured

As you can see, the time is very similar in both scenarios, and there is a good reason for this. I just installed a brand new Windows 10 environment, and I haven’t configured my GPU / CUDA.

Lucky for us, there is an option in the Environment process, which allow us to check if our GPU will work.

Last time, it took me almost a day to configure my NVIDIA CUDA environment. So, as soon as I get this up and running, I’ll update this post!

Happy coding!

Greetings

El Bruno

References

#Opinion – Face-Depixelizer , a sad sample of how ML illustrates preexisting bias

Buy Me A Coffee

Hi !

During the past days, you may see this images about how a new ML model can start with a pixelated image of a face, and .. let me share the official project description:

Given a low-resolution input image, Face Depixelizer searches the outputs of a generative model (here, StyleGAN) for high-resolution images that are perceptually realistic and downscale correctly

GitHub, Face-Depixelizer (see references)

Great Idea, sadly, one of the first tested images show this

You probably guess the source image, and you can see how wrong is the guess. However, it’s not just a mistake, after a quick search we can find some other bad samples of the tool.

And we can even find some scary face generation from video game characters (see references)

Why this is wrong ?

Just taking a look at the generated faces, will give you a sense of what’s wrong here.

There is a trend which basically denied an error here. Researchers in deep generative modeling are obsessed with generating photo-realistic images from more abstract/low-information representations (down-sampled, cartoons, sketches, etc.). The technology behind this is amazing, however in this case, is not just “lack of data”, or a very poor trained ML model. The Model uses the popular FFHQ faces dataset, which seems to have a very diverse group of faces.

And here goes my question: how far did the author tested this before publishing? I’m guessing that if you just share this with a couple of friends (ML enthusiasts), someone will point all these errors back to you. Unless, your test circle is so poorly diverse, that you didn’t get to this point.

So, I’ll assume the best from the author, but I’ll also realize how these practices defines a specific type of bias in ML, or in software development in general.

These days, I learned a lot about history, empathy and, and the end I think we all need to do our best to be better humans.

In the following video, you will find an amazing story and samples about bias in Machine Learning.

Bonus: if you wonder how this works with Asian group? Let’s share a Lucy Lu sample

Happy coding!

Greetings

El Bruno

Resources

#Podcast – NTN 55 – Machine Learning y datos, muchos datos con Miguel Egea @miguelEgea @jc_quijano,

Buy Me A Coffee

Buenas!

Hoy tenemos la suerte de hablar con Miguel Egea (@miguelEgea) y Juan Carlos Quijano (@jc_quijano) sobre Machine Learning, y datos, muchos datos. Miguel es uno de los principales referentes en lo que a datos se refiere, así que tener la oportunidad de hablar con el de varios temas, es todo un privilegio!

Speakers

  • Miguel Egea es Technical Advisor en Solid Quality Mentors (LinkedIn)
  • Juan Carlos Quijano Abad es Microsoft Certified Trainer, Arquitecto de Soluciones en Azure, Consultor independiente en implantación de DevOps (LinkedIn)
  • Bruno Capuano es Canada Innovation Lead at Avanade and Microsoft AI MVP (LinkedIn)

Ir a descargar

Happy coding!

Greetings

El Bruno

#Event – Machine Learning.Net y AutoML, esta vez en Español !

Buy Me A Coffee

Buenas !

Seguimos en modo StayAtHome, y una forma excelente de conectar con las comunidades, es participando en eventos ya sea como Speaker o como Attendee.

Esta vez tengo la oportunidad de hablar en NetCoreConf:

NetCoreConf 2020

Lo último en tecnologías Microsoft y mucho más con los mejores expertos. Donde podrás aprender, compartir y hacer networking. Asistiendo a diversas Conferencias y Workshops. Hablaremos sobre NetCore, Azure, Xamarin, IA, Big Data. ¿A que estas esperando?

NetCoreConf 2020 realizará el primer evento virtual a nivel global dedicado exclusivamente al sector del desarrollo y consultoría que busca descubrir y dar a conocer las nuevas tecnologías de vanguardia y crear vínculos estratégicos que generen sinergias conjuntas entre los profesionales del sector, empresas e instituciones.

NetCoreConf 2020

Mas información NetCoreConf Virtual 2020

La agenda es impresionante, y yo hablaré de uno de los productos más interesantes que Microsoft ha presentado en los últimos años: Machine Learning.Net. En mi sesión comentaré un poco la historia y algunos ejemplos del producto, y además un poco de una herramienta muy interesante para los no programadores: AutoML.

Finalmente, agradecer al gran equipo que esta detrás de este evento:

Happy coding!

Greetings

El Bruno

#Event – Resources used in the #devdotnextdigital session around Anomaly Detection #devdotnext2020

Buy Me A Coffee

Hi!

I had an amazing time with the Dev.Next team in a virtual session. The agenda was great, I joined a couple of session and it was great ! Take a look at the full set of contents here. Recording sessions soon !

Important: the event was postponed to August, and you can more information here.

Slides

Source

Updated source code soon !

Reference Links

General

Machine Learning.Net

Cognitive Services Anomaly Detector

Azure Machine Learning

Happy coding!

Greetings

El Bruno

#Event – (update) @devdotnext now in virtual mode ! #devdotnext2020

Buy Me A Coffee

Hi!

These are strange days, however we all try to do our best to move forward. An important part of today’s behaviors is to try to avoid big events. That’s why, in the last 2 weeks, we get news about events being cancelled all over the world.

I have a plan to visit Colorado, US, in a couple of weeks for the Dev.Next event. However, due to Covid-19, the event was postponed to August (more information here).

The amazing organizing team, decided to face this with a big smile and organized a mini virtual version of the event. This is the official announcement:

dev.next is happy to announce a mini digital event on March 24, 2020. The event is free to attend. We will post link here on March 24th. Recordings from the event will be available later. Please check back here for links to the recordings.

dev.next digital event

I’ll be part of this Digital / Virtual Days hosting a remote session around AI and Anomaly Detection, with code and without code !

Take a look at the agenda here.

Happy coding!

Greetings

El Bruno