#AI – MineRL, play #Minecraft to benefit science!

Hi !

I’ve write a couple of time about project Malmo and Minecraft, so if you like Minecraft and Artificial Intelligence, MineRL will make your day. Let’s start with some basis:

MineRL is a large-scale dataset on Minecraft of seven different tasks, which highlight a variety of research challenges including open-world multi-agent interactions, long-term planning, vision, control, navigation, and explicit and implicit subtask hierarchies.

There are 2 main ways to be involved with MineRL, entering the AI (DL) competition, or playing Minecraft (to create more source data to train and test models!)

In the play more, MineRL want to solve Minecraft using state-of-the-art Machine Learning! To do so, MineRL is creating one of the largest datasets of recorded human player data. The dataset includes a set of tasks which highlights many of the hardest problems in modern-day Reinforcement Learning: sparse rewards and hierarchical policies.

There is plenty of information and details on the main website, and as soon as I finish some of my current work and personal projects, I’ll for sure spend more time here!

More information http://minerl.io/about/

Happy coding!

Greetings @ Toronto

El Bruno

Advertisements

[Xamarin.Forms] Mejorar el rendimiento en el tiempo de arranque

Javier Suárez | Blog

Introducción

Además de cuidar detalles como la funcionalidad o la apariencia visual de nuestra aplicación, nuestra aplicación debe funcionar correctamente bajo todas las condiciones en todos los dispositivos para la que sea lanzada.

Un punto importante a revisar siempre suele ser, el tiempo de arranque de la aplicación.

¿Conoces conceptos como AOT?, ¿fast renderers?. En este artículo vamos a repasar algunos conceptos que podemos aplicar para tener un impacto positivo en los tiempos de arranque de la aplicación.

XAMLC

Si defines la interfaz de usuario de la aplicación Xamarin.Forms con XAML tienes la opción de utilizar XamlCompilationOptions.

Cuenta con dos valores:

Compile.

  • Acelera la carga de elementos visuales.
  • Reduce el tamaño del paquete.
  • La compilación (AOT) es más larga.

Skip.

  • Valor por defecto para mantener retocompatibilidad con versiones antiguas de Xamarin.Forms.
  • No hay validación en tiempo de ejecución de XAML.

Ejemplo de uso:

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

La diferencia:

Rendimiento con…

View original post 414 more words

#Event – Toronto #InsiderDevTour on June 19

Hi !

The Insider Dev Tour is for developers interested in building Microsoft 365 experiences (Windows, Graph, Office, Teams) today, using the latest dev technologies, as well as for those who want a peek into the future. If you can read code, this is for you, regardless if you are a beginner, an expert, a student, or a hobbyist developer.

The morning keynote session will give you a demo and code-focused overview of the new developer technology emerging from Redmond. It’s the best of Microsoft Build for Microsoft 365 developers. We’ll cover Windows, Graph, Office, AI, and more so that you are up-to-date and able to make informed decisions when choosing from the latest technology for your next project.

This is a 100 percent developer-focused event.

The tour is an opportunity to connect directly with leads and engineers from Redmond, as well as regional industry leaders and the community of Microsoft MVPs and RDs. We’re excited to meet you in person! #InsiderDevTour

More information https://developer.microsoft.com/en-us/windows/campaigns/ca-toronto

Greetings @ Toronto

El Bruno

[Xamarin.Forms] Mejorar el rendimiento al trabajar con imágenes

Javier Suárez | Blog

Introducción

El uso de imágenes en aplicaciones móviles es habitual. Es un elemento clave a la hora de conseguir buenos resultados visuales. Sin embargo, también suelen ser uno de los puntos clave que impactan en el rendimiento de la aplicación. Problemas como:

  • Alto consumo de memoria.
  • Bloqueo de la UI (carga de imágenes en el hilo de UI, etc).
  • Etc.

En este artículo, vamos a realizar comparaciones en el rendimiento del control Image de Xamarin.Forms entre diferentes versiones, así como una comparativa con FFImageLoading y GlideX.

Para realizar las comaparativas vamos a necesitar un ejemplo y algo de código para obtener información. Nuestro ejemplo va a ser una versión modificada del gran ejemplo realizado por Jonathan Peppers en Glidex.

El ejemplo

A la hora de medir, vamos a utilizar:

System.Diagnostics.Process.GetCurrentProcess().WorkingSet64

Para obtener la cantidad de bytes que se estan consumiendo.

Imágenes en Xamarin.Forms

El control Image de Xamarin.Forms permite…

View original post 667 more words

#Twitter – #Accessibility in images in Twitter, 5 extra seconds will help a lot of people! @kastwey

Sunset in the Tuscany

Hi!

So, the trip to Italy is done, and I have the best memories ever. I’ve spend some time with the Global Avanade Innovation Network, and it was amazing to see again my friends from all around the globe.

I was supposed to continue my series of posts on Face Recognition and Python. Remember, I was down from 5 FPS to 30 FPS with some minor tweaks. But I have in my notes a different post to write.

It all started when my friend Juanjo (@kastwey) kindly asked to everyone in twitter to describe the images we use in each tweet. Juanjo is blind, and he is an amazing developer. Every time I talk to him, he reminds me how we can do some little extra efforts and make his life more easier.

Sometime ago, I was used to share my code samples as images in my blog, and JuanJo shared how difficult was to him to read this code. My code is not very good, but you never know …

So, if you want to help people in Twitter who may not be able to see the graphics content you share, please follow the next steps. This is for Twitter for Android, I’m sure that the iOS app will be similar.

  • Open Settings in the Twitter App
Twitter Android Settings
  • Select [Accessibility]
Twitter Android Settings Accessibility options
  • Check [Compose image descriptions]
  • That’s it!

Now, every time you write a new tweet you will be prompted to add an image description for every photo / picture.

Remember, 5 seconds may help a lot of people!

Happy coding!

Greetings @ Toronto

El Bruno

#VSCode – Let’s do some #FaceRecognition with 20 lines in #Python (5/N)

Hi !

I’ll start with my posts

  1. Detecting Faces with 20 lines in Python
  2. Face Recognition with 20 lines in Python
  3. Detecting Facial Features with 20 lines in Python
  4. Facial Features and Face Recognition with 20 lines in Python

And after yesterday’s post I realize that the code is working, but there is room for performance improvement. So, I went back to my 1st sample, the one for face detection and I added some code to get some times for Frames per Second (FPS).

In my initial code, the app was working processing almost 6 FPS. Then I started to read the code and think on improvements and I manage to get an amazing +30FPS.

So, before moving forward, I want to remark this StackOverflow post that quickly pointed me in the easiest way to do a StopWatch in Python.

My original code, was this one:

And then, I realize that I may use some of the OpenCV functions to increase the face detection process. I really don’t need to process a full HD image (1920 x 1080), I may resize the frame to a quarter size and work with this. That’s how, based on some of the samples, I got the following code:

The line 12 perform the initial resize and then I recalculate back the positions before drawing the face frame. This process works almost 6 times faster than the original one.

I’ll continue improving the code and samples, and sharing my learning path !

Happy Coding!

Greetings @ Burlington

El Bruno

Resources

#VSCode – Let’s do some #FaceRecognition with 20 lines in #Python (4/N)

Hi !

Quick post today. I’ll pickup yesterday demo, showing the facial features and adding Face Recognition on top of that. In other words, we’ll move from this

To this

With a couple of extra lines for face recognition

There is some room for performance improvement, so I’ll focus on this in next posts.

The complete project is available here https://github.com/elbruno/Blog/tree/master/20190528%20Python%20FaceRecognition

Happy Coding!

Greetings @ Burlington

El Bruno

Resources

My Posts

  1. Detecting Faces with 20 lines in Python
  2. Face Recognition with 20 lines in Python
  3. Detecting Facial Features with 20 lines in Python

#VSCode – Let’s do some #FaceRecognition with 20 lines in #Python (3/N)

Hi !

In my previous posts I explained how to detect faces and perform face recognition in python. Today I’ll explore another feature in the face_recognition package: Find Facial Features.

The live camera output will be something like this:

Note: Special thanks to my daughter who is always OK to help me with this.

The main sample in the source code uses a photo to detect facial features and creates a new one with the features detected. In the following sample, is amazing to check that it detect a far away face behind the main ones and also, somehow, it detect some landmarks behind my girl glasses:

I wanted to see how fast this library work to perform this with a live camera feed, and the results are very good.

I spend sometime figuring out the best way to draw lines with OpenCV, at the end the PolyLine() function is the one doing all the magic (lines 14 to 17). It took me sometime, to find the best way to deal with matrix transformations and some other performance tricks, but at the end I get this up and running in 25 lines which is kind of amazing. And the final code is very simple:

The complete project is available here https://github.com/elbruno/Blog/tree/master/20190528%20Python%20FaceRecognition

Happy Coding!

Greetings @ Burlington

El Bruno

Resources

My Posts

  1. Detecting Faces with 20 lines in Python
  2. Face Recognition with 20 lines in Python

#RPi – Some #RaspberryPi screen options and how to quickly find your device IP with #RaspberryPi Finder from @Adafruit

Hi !

Today’s post is about my experience doing presentations and demos with a Raspberry Pi.

Doing demos with a Raspberry Pi is amazing. I really enjoy share some of the amazing stuff we can do with the device, and usually there is one or two people in the audience who can share other even better Raspberry Pi experiences.

The only issue that you find in this scenarios is an easy way to connect your device to an internet connection. Sometimes, using a standard network cable between your laptop and the device is good enough, however there are other scenarios where connecting to a network is more complicated. In example: the Raspberry Pi connects automatically to a WiFi network, and you need to find the IP address to interact with the device.

These days, I ordered a Raspberry Pi 3 case with includes a 3.5 inches TFT screen, also with touch capabilities. I hope that, using this and a Bluetooth keyboard should make my life easier. (see references)

Sometimes you can’t connect your device to a HDMI screen, so a good option is to bring your own 7 inches screen for the device. For me, this is not optimal, because I need to handle a lot of cables, but it works every-time!

The following image show my typical hotel bedroom when I’m speaking and using a Raspberry Pi. Laptop, Raspberry Pi, Bluetooth keyboard, a mouse, the 7 inches screen, and more.

Finally, if your device is connected to the same wireless network but you don’t know the IP address, you may want to use a tool like Adafruit Raspberry Pi Finder. It only requires 2 clicks to find one or more devices in your network.

I’ll leave this here, and maybe in the near future I’ll update this posts with my experiences using the small case with TFT screen.

Happy coding!

Greetings @ Burlington

El Bruno

References

#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