#MacOs – Where is my Putty? Need for SSH and RealVNC to connect to #RaspberryPi [experiences in Mac from a #Windows user]

Hi !

In my previous post I share the context on why I’m a total newbie into the MacOS world. So today, I want to share another experience when switching from Windows to Mac.

As my previous content, the need for a SSH client is based on my live demos on my Custom Vision event. (Remember, Custom Vision is one of the most amazing services in the Cognitive Services family)

At some part on my demo, I create a new Custom Vision project, I export the project as a Docker for Linux, and I make some changes to the Docker Image to be compiled and used on a Raspberry Pi.

I can access and control the Raspberry PI using RealVNC, which is available for for Windows and Mac, or I can also access the device using SSH (SSH stands for Secure Shell). The second option is usually more appealing, because is just a big console app and everyone can read the commands sent to the device.

So, on Windows I was using Putty for a long time. It’s very light and easy to use. However, the description of the product makes a very clear statement about the supported OS of Putty.

PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers.

It was time to hit Bing and search for options or alternatives to Putty on MacOS. And this one was easy. After a couple of minutes I realized that I can use the standard MacOS terminal to connect to my device using SSH with a command like this one

MACTERMINAL:~ bruno.capuano$ ssh <DEVICE IP> -l <LOGIN NAME>

Once you enter the ssh command, with the IP and and the login name, it will promtp for the password and that’s it! I’m now connected to my device

 

01 doker build on mac

This one was easy !

Happy coding!

 

Greetings @ Burlington

El Bruno

References

Advertisements

#Event – Webinar: Getting Started with ML.NET and Windows Machine Learning, Today with the GLUG .Net User Group

giphy-downsized

Hi !

Another virtual event about Windows ML and Machine Learning .Net, and this time with my good friends from Okemos, MI. The event will be

Getting Started with ML.NET and Windows Machine Learning

One more time, we have new features and improvements on the platform since the previous event, so it’s time for me to review and prepare new content. In example, use TensorFlow and ML.Net !!!

Description  

Machine Learning has moved out of the lab and into production systems. Understanding how to work with this technology is one of the essential skills for developers today. In this session, you will learn the basics of machine learning, how to use existing models and services in your apps, and how to get started with creating your own simple models.

In other words, if you are a .NET developer, this session is for you! We will cover the basics of ML.NET, a complete machine learning framework to work with C#, F# or any other .NET Core language.

Online Register https://www.meetup.com/GLUGnet/events/qkmgpkyzdbcc/

Happy Coding!

Greetings @ Burlington

El Bruno

#MacOs – Where is my Paint? [Primeros días en MacOs después de décadas en #Windows]

Buenas !

Antes de comenzar, creo que es mejor compartir un poco de contexto. He sido un usuario de Windows por mas de 2 décadas. He probado y utilizado otros SOs, como Linux, cuando trabajo con mi Raspberry Pi; o hace mucho tiempo con Xamarin y Mac OS. Sin embargo, mi SO principal siempre ha sido Windows.

Hace un par de semanas cambie mi fabulosa SurfacePro por un MacBook Pro. Y comencé a conocer el grandioso mundo de MacOS. Es por eso, que después de un par de tweets divertidos he decidido compartir un par de posts al respecto. El primero es bastante auto-descriptivo

Where is Paint in Mac?

OK, mas contexto. En mis presentaciones cuando hablo de Custom Vision (uno de los mejores servicios de la familia de Cognitive Services), usualmente utilizo las demos que usamos durante el InsiderDev tour . Estas son muy descriptivas porque se basan en un par de dibujos a mano alzada.

Usar estas imágenes me permite de una forma simple, mostrar como Custom Vision permite crear un modelo de reconocimiento de imagenes. Algo similar a esto:.

Screen Shot 2019-02-19 at 1.41.58 PM

Una de las ventajas de este modelo es que puedo crear nuevas imágenes, por ejemplo una flor o un pez, utilizando solo el mouse.

Una vez que he entrenado un modelo, la siguiente demo que realizo en vivo, es dibujar un pez o una flor con una App como Paint. La herramienta no tiene que ser muy poderosa ni tener muchas funcionalidades, solo un canvas en blanco y un lápiz para poder dibujar algo simple.

Cuando comencé a practicar mi sesión en mi MacBook Pro, me di cuenta que no tenia Paint, ni algo similar en MacOS. La app Preview, para abrir imágenes, permite realizar modificaciones menores en imágenes.

Nota: Practicar, practicar y practicar, esa es la clave de buenas sesiones.

Screen Shot 2019-02-19 at 1.50.44 PM

Este es un buen punto de partida, sin embargo la app no permite crear un archivo en blanco. En este momento, publique un tweet preguntando al respecto y gracias a las respuestas, comencé a probar algunas app. La que mejor se adapto a lo que yo necesitaba era : Paintbrush

Screen Shot 2019-02-18 at 1.19.16 PM

Esta app es simple y con funcionalidades similares a Paint de Windows. En uno de los tweets, me recomendaron una pagina con muchas alternativas para Microsoft Paint: Microsoft Paint Alternatives for Mac

Bonus: Krita (link) es una app free para editar imagenes, sin embargo es demasiado para lo que yo necesitaba. 😀

 

Saludos @ Toronto

El Bruno

References

#MacOs – Where is my Paint? [experiences in Mac from a #Windows user]

Hi !

Let me start with some context, I’ve been using Windows from over 20 years. I’ve play around with other OS, like Linux when I’m using my Raspberry Pi; or Mac back in some old Xamarin days. However my main platform was always Windows.

A couple of weeks ago I switched my portable device from a Surface Pro to a MacBook Pro. And I started to face the amazing world of Mac. So that’s why I write some experiences here on simple stuff like: Where is Paint in Mac?

OK, more details. When I present Custom Vision, one of the most amazing services in the Cognitive Services family, I get back to the demos from the InsiderDev tour with a couple of simple drawings.

It’s a very powerful way to show how to train a ML image recognition model, something like this.

Screen Shot 2019-02-19 at 1.41.58 PM

You can see that the main pictures were easy to draw, even using a mouse. Something like a fish or a flower.

When I have my model trained, I usually draw a flower or a fish in “live mode” and test my ML model with this. In Windows, I didn’t use anything fancy, the default Paint app was good enough.

However when I start to practice my session in my MacBook I found that I don’t have anything similar to Paint in the OS. The preview App is good to see pictures and it will also allows Mac users to perform some minor edits.

Screen Shot 2019-02-19 at 1.50.44 PM

However, it doesn’t allows you to create a new blank canvas from scratch. So, I went to twitter and start to ask around about best user experiences. After a few tests I found a Mac App which was great for my requirements: Paintbrush

Screen Shot 2019-02-18 at 1.19.16 PM

The app is simple and useful enough like the original Paint from Windows. And there are some other options like the ones who suggested in this tweet: Microsoft Paint Alternatives for Mac

 

As a bonus, there is an amazing app for image editing named Krita (link). It’s amazing but it was too much for my simple requirements 😀

 

Greetings @ Burlington

El Bruno

References

#Event – Resources used on my session at the largest Canada makeathon: @MakeUofT [How a PoC at home can scale to Enterprise Level using #CustomVision APIs]

2019 02 16 MakeUofT Custom Vision Bruno

Hi !

What an amazing time at the Canadian Largest Makeathon: MakeUofT (https://ieee.utoronto.ca/makeuoft/). The event, people and ideas are great. And now it’s time to share some of the materials used during my session

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

It all started with a DIY project to use Computer Vision for security cameras at home. A custom Machine Learning model is the core component used to analyze pictures to detect people, animals and more in a house environment. The AI processing is performed at the edge, in dedicated hardware and the collected information is stored in the cloud.

The same idea can be applied to several CCTV scenarios, like parking lots, train stations, malls and more. However, moving this into enterprise scale brings a set of challenges, which are going to be described and explained in this session.

These are the slides I’ve used

And the source code is available here

https://github.com/elbruno/events/tree/master/2019%2002%2016%20MakeUofT%20Custom%20Vision

In the source code you can find the console and Windows 10 app samples I’ve coded live and also the exported images of my custom vision demo project in windows, linux and raspberry pi flavors. The 3rd one is where I spent some time updating the original linux one to work on the small device.

And as usual a couple of interesting links

Greetings @ Toronto

El Bruno

#VS2019 – Lanzamiento de Visual Studio 2019 el 2 de Abril 9:00am PT

 

visual studio 2019 launch event

Buenas !

Es tiempo de preparar el 2do monitor para el próximo 2 de Abril, cuando se presenta la nueva versión de Visual Studio 2019 !

Grandes speakers como Scott Hanselman y otros, estaran en una sesion de 7 horas presentando la ultima version de Visual Studio. El evento oficial y los detalles se pueden encontrar en https://visualstudio.microsoft.com/vs2019-launch/ , es tiempo de agregar el reminder y disfrutar el nuevo IDE !

Saludos @ Burlington

El Bruno

#VS2019 – Visual Studio Launch event on the next April 2nd, 9:00am PT

 

visual studio 2019 launch event

Hi !

You may want to get your 2nd monitor ready on the next April 2nd, 9:00am PT, because is the official launch of Visual Studio 2019 !

Scott Hanselman and other amazing set of speakers will host a 7 hour session introducing the latest version of Visual Studio. So, go to https://visualstudio.microsoft.com/vs2019-launch/ , add the reminder to your calendar and get ready also for some local launch events !

Greetings @ Burlington

El Bruno

#Docker – Sobre puertos, IPs y mas para acceder a un container alojado en #RaspberryPi

Buenas !

Mi proyecto de CustomVision.ai esta compilado y ejecutándose en Docker en Raspberry Pi 3. Ahora llega el momento de utilizar el mismo desde aplicaciones en otros dispositivos, y para este caso, todos en la misma red.

Cuando ejecute mi imagen, utilice parámetros para definir la IP y los mapeos de los puertos de la misma. El siguiente comando es muy útil para ver esta información en un container.

sudo docker port <CONTAINER ID>

01 docker port

Mi container esta registrado en la dirección IP 127.0.0.1 y utiliza el puerto 80. Esto es genial para procesos locales, sin embargo no permite que este container sea accedido desde otros devices.

Lo ideal es no registrar la direccion IP local 127.0.0.1 y solo definir el mapeo de puertos 80:80. En este caso ejecuto mi imagen con el siguiente comando

sudo docker run -p 80:80 -d <IMAGE ID>

02 docker port 80 and success run

El container utilizar el puerto 80, y Docker toma control de este puerto en la RaspberryPI. La dirección IP de la raspberry pi es [192.168.1.58], así que ya puedo realizar pruebas con Postman para analizar imágenes en la RPI.

03 docker image analysis from postman

Super cool. Un potente y barato server de análisis de imágenes basado en un proyecto de CustomVision por menos de $30 !

Happy coding!

Greetings @ Burlington

El Bruno

References

My Posts

  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

Windows 10 and YOLOV2 for Object Detection Series

#Docker – About ports, IPs and more to access a container hosted in a #RaspberryPi

Hi !

So, my CustomVision.ai image is build and running in a container in my Raspberry Pi 3. It’s time to see if I can use it from other devices in the same network. When I run my image I defined IP and Port, but if you want to know these information, the following command is very useful

sudo docker port <CONTAINER ID>

01 docker port

So, my container is listening at 127.0.0.1 in port 80. That’s cool for local processing, however I want to access my container from other devices in the same network. In order to do this, I’ll run my image with the following command (I’m not defining the IP, just the port 80)

sudo docker run -p 80:80 -d <IMAGE ID>

02 docker port 80 and success run

The container is using the port 80, and docker is taking over this port in my device. My Raspberry PI device IP is [192.168.1.58], so I can go back and make some tests using Postman to analyze images in the device.

03 docker image analysis from postman

That’s cool. A small CustomVision image analyzer server for less than $30 !

Happy coding!

Greetings @ Toronto

El Bruno

References

My Posts

  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

Windows 10 and YOLOV2 for Object Detection Series

#Docker – Container muere inmediatamente después de ser iniciado en #RaspberryPi. Obviamente, era un problema de dependencias de #TensorFlow

Buenas !

La creación de imágenes en Docker es un proceso divertido. Cuando cree la imagen de CustomVision.ai para ser ejecutada en Docker en Raspberry Pi, me encontré con unos errores interesantes, así que aprovechare este post para escribir sobre los mismos.

La compilación de cada imagen suele tardar alrededor de unos 15 minutos. Ver que la misma compila correctamente es un momento de alegría, que se veía arruinado cuando al momento intentar iniciarla, el container se destruía automáticamente. El comando con el que iniciaba el mismo es el siguiente

sudo docker run -p 127.0.0.1:8080:80 -d <IMAGE ID>

Estuve leyendo mucho y encontré varias opciones para intentar comprender que sucede. Al final opte por intentar analizar los eventos en tiempo real que Docker publica con el comando

sudo docker events&

01 docker events

En la consola podemos ver un buffer lleno de eventos de Docker. Después de varios intentos con mi imagen, me encontré con mensajes similares a los siguientes.

2019-02-12T07:34:46.195722938-05:00 container start cdcdcc410518db46e09967412bd583c33cff6f4e8eee0f10e8baeec860f9c9a2 (image=295, io.balena.architecture=armv7hf, io.balena.device-type=raspberry-pi2, io.balena.qemu.version=3.0.0+resin-arm, name=musing_zhukovsky)

2019-02-12T07:34:46.195722938-05:00 container die cdcdcc410518db46e09967412bd583c33cff6f4e8eee0f10e8baeec860f9c9a2 (image=295, io.balena.architecture=armv7hf, io.balena.device-type=raspberry-pi2, io.balena.qemu.version=3.0.0+resin-arm, name=musing_zhukovsky)

Es fácil interpretar que después de la fecha y hora del evento, la descripciones “container start” y “container die”, describen el comportamiento que estoy analizando. Estaba un poco mas cerca.

Sin embargo, el evento no presenta mucha información sobre el error. Es por esto, que utilizando el <LOG ID> podemos obtener mas información con el siguiente comando.

sudo docker logs cdcdcc410518db46e09967412bd583c33cff6f4e8eee0f10e8baeec860f9c9a2

02 docker event details

Esto ya es mucho mejor! Ya puedo ver un archivo de código fuente en python y ademas el error, que en este caso, se da al intentar importar el modulo Pillow. Ahora ya puedo abrir python y todo cobra sentido.

03 app python details

Pues bien, ahora solo queda ver las dependencias y herramientas que necesita TensorFlow para instalar las mismas en el orden correcto antes de compilar la imagen.

Happy coding!

Greetings @ Toronto

El Bruno

References

My Posts

  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

Windows 10 and YOLOV2 for Object Detection Series