#Windows10 – Can’t install #docker on Windows 10 Home, need Pro or Enterprise

Hi !

I hold my series of posts on  Custom Vision to add another brain reminder, this one is

Do not install Windows 10 Home if you are going to use Docker!

I recently installed a new dev environment, and when I was going to install Docker Desktop I found this amazing message

Docker Desktop requires Windows 10 Pro or Enterprise version 14393 to run.

cant install docker 2.0.0.2 on win10 1903 18329

I initially think that this was related to Windows Insider build, and after a quick bing search I realized that you can’t install docker desktop on Windows 10 Home edition.

win 10 home edition

So, it was time to go to my MSDN Product Keys and find a Windows 10 Pro activation key to upgrade my dev environment

upgrading windows

2 clicks later, it was done and I was able to continue my Docker journey!

Happy coding!

Greetings @ Toronto

El Bruno

References

My Posts

Windows 10 and YOLOV2 for Object Detection Series

Advertisements

#Humor – Knock Knock Async function

Hi !

knock knock async function

Greetings @ Burlington

El Bruno

Source: https://thecodinglove.com/

#Event – Cold weather? > All the @MVPDays sessions available for offline viewing !

snowstormintoronto

Hi !

While we are enjoying this amazing days with -20C as average temperature, it’s maybe the perfect excuse to watch and learn with all the videos from yesterday’s MVP Days session.

All of the recording are available here: https://www.youtube.com/playlist?list=PLW-BLrn2azoSeYbDWqNeQa83B5R8gc2vY 

And the topics are:

  • MVPDays – Securing Service Accounts The Modern Way – John O’Neill Sr
  • MVPDays – DevOps ICU: Improving DevOps Results by (Correctly) Integrating UX – Debbie Levitt
  • MVPDays – Getting Started with Azure Devops – Gregor Suttie
  • MVPDays – Automate blockchain w/ Azure Blockchain Workbench and Microsoft Flow – StefanoTempesta
  • MVPDays – Getting Started with Machine Learning.Net and Windows Machine Learning – Bruno Capuano
  • MVPDays – Ten practical tips to secure your corporate data with Microsoft 365 – Peter Daalmans
  • MVPDays – The First 5 Things To Getting Started with Teams: IT Admin Edition – Jeremy Miller
  • MVPDays – Automate your Patching with Azure Patch Management – Sarah Lean
  • MVPDays – Xamarin and the Cloud – Rebai Hamida
  • MVPDays – Microsoft Teams: A Collaboration Story – Muditha Chathuranga
  • MVPDays – Hardening Windows Server – Orin Thomas
  • MVPDays – Azure AD Domain Services – domain controllers in the cloud? – Sam Cogan
  • MVPDays – Configure Azure AD Connect like the Pros – Max Fritz
  • MVPDays – Going Serverless on Azure – Ivan Culjak
  • MVPDays – Azure STack Development Kit the cheap Azure Development platform – Carsten Rachfahl

Happy coding !

Greetings @ Toronto

El Bruno

#VS2019 – Working with #Python Environments now is so cool !

Hi !

Let me start with IANAPU [I am not a Python user], and that’s maybe why, when I need to work and understand what is in my current environment it took me a lot of time to get and deploy the correct tools and the right packages to work with. I’m not a fan of console environments, and if we add this to the 90% of the Python work, that maybe the main problem.

Visual Studio Code is amazing environment to work with Python. So far, is good enough for me and my machine learning devs. I’ll became a brand-new Mac user in the next couple of days, so I hope that everything I’ve learned is the same on Mac.

I was trying some of the new features in Visual Studio 2019 Preview 2, and the options to manage Python environments blown my mind.

Let’s start with a single Python Application in the solution explorer. With 2 clicks I know what I have in my environment: current python version, packages and more.

01 python environment in vs2019 preview 2 solution explorer

With 2 clicks I can add a new environment, where I can choose the Python version, a base Anaconda environment, and tons of options more.

02 new python environment

If we decided to create an Anaconda working environment, we can load our working packages from a file, or from a cool drop-down list.

03 new python environment based on conda

Adding and upgrading packages is done with the usual Visual Studio integrated experience

04 install new packages05 upgrade packages

Of course, we have the option to review the Console logs, to understand the background processes

Virtual environment is being created at '...\Python\PythonApplication1\envBlog01'
Virtual environment was successfully created at '...\Python\PythonApplication1\envBlog01'
----- Creating 'envBlogConda01' -----
Solving environment: ...working... done
## Package Plan ##
  environment location: d:\ProgramData\Anaconda3\envs\envBlogConda01
==> WARNING: A newer version of conda exists. <==
Preparing transaction: ...working... done
  current version: 4.5.4
  latest version: 4.6.1
Please update conda by running
    $ conda update -n base conda
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use:
# > activate envBlogConda01
#
# To deactivate an active environment, use:
# > deactivate
#
# * for power-users using bash, you must source
#
----- Successfully created 'envBlogConda01' -----


---- Installing 'numpy' -----
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/31/7e/8905636f7e4f9b9d7078aa0e701500634f832f145855a11beb098d3b0fb1/numpy-1.16.0-cp36-cp36m-win_amd64.whl (11.9MB)
Installing collected packages: numpy
Successfully installed numpy-1.16.0
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
----- Successfully installed 'numpy' -----


---- Installing 'pip' -----
Collecting pip==19.0.1
  Downloading https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl (1.4MB)
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-19.0.1
----- Successfully installed 'pip' -----

Happy Coding!

Greetings @ Toronto

El Bruno

References

#Event – 30 min of #MachineLearning.Net on the next @mvpdays on Jan 30!

aerial photo of mountain surrounded by fog
Photo by icon0.com on Pexels.com

Hi !

less than 24 hours for a full day of free training, take a look at MVP Days.

I was lucky enough to have my slot to share some experiences and a zero to one demo on Machine Learning.Net

Getting Started with Machine Learning.Net and Windows Machine Learning

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.
And if you are a .Net developer, we will cover the basis of Machine Learning.Net, a complete ML framework to work with C#, F# or any other .Net Core language.

You should really check the agenda, there are a lot of amazing topics and speakers !

Greetings @ Toronto

El Bruno

#WinML – #CustomVision, object recognition using Onnx in Windows10, calculate FPS

Hi !

Quick post today. And it’s mostly as a brain reminder on the best way to perform a Frames Per Second calculation when we are analyzing images using a ONNX model. In the final UWP app, I added a top right label displaying the current date and time, and the processed FPS

01 custom vision uwp frame analysis using onnx fps

And the code behind all this is very simple, specially line 10

So, I’ll search for my sample next time I need to display this.

The full app can be seen in https://github.com/elbruno/events/tree/master/2019%2001%2010%20CodeMash%20CustomVision/CSharp/CustomVisionMarvelConsole01

Happy Coding!

Greetings @ Burlington

El Bruno

References

My Posts

Windows 10 and YOLOV2 for Object Detection Series

#Azure – Single Key for all Services in #CognitiveServices, that’s cool :D

Hi !

Quick Friday post. And an amazing one, because now we have the chance to create a single Key to be use around a bunch of Cognitive Services. That’s mean we don’t need to remember and store different keys for LUIS, Face Emotion, and more. A single key will cover most of these scenarios with 3 simple steps

 

More information in What’s New? A Single Key for Cognitive Services on Channel 9 by Noelle LaCharite

Happy coding!

Greetings @ Burlington

El Bruno

#Onnx – Object recognition with #CustomVision and ONNX in Windows applications using Windows ML, drawing frames

Hi !

Custom Vision Allows us to create models of Object recognition. Once these models are trained, we can analyze an image and the model will offer us as an answer

  • A list of [Tags] objects detected in each image
  • For each TAG we will also have the probability [score] associated with it and a series of numerical values with the position of the object found within the analyzed image

In previous posts I wrote about how to perform object analysis from the feed From a Webcam In a Windows 10 application. The next step is to show the Frame of the recognized object.

01 custom vision analysis and draw frame

The following code shows an example of how to show the frames In the Windows 10 App using a Canvas. The 2 main functions are

  • DrawFrames(Where an iteration of the predictions made
  • DrawFrame() This is the function that takes care of drawing the Frame in real time. There’s a little bit of math in it to adjust the ONNX values to the actual size of the Canvas and the Webcam.

For example, these are the values that I work with in a tag of Iron Fist In the image of this post.

  • The Canvas size is Actual Width: 1356, Actual Height: 700
  • The values returned by ONNX prediction process are Top: 20.80284, Left: 73.15757, Height: 54.41817, Width: 24.3813
  • The Frame To show will be drawn with the following values Y: 140, x: 989, Height: 378, Width: 325

In following posts I’ll comment on final details on how to measure processing time and other tips.

The full app can be seen in https://github.com/elbruno/events/tree/master/2019%2001%2010%20CodeMash%20CustomVision/CSharp/CustomVisionMarvelConsole01

Happy Coding!

Greetings @ Burlington

El Bruno

References

My Posts

Windows 10 and YOLOV2 for Object Detection Series

#Onnx – Object recognition with #CustomVision and ONNX in Windows applications using Windows ML

Hi!

One of the most interesting options that gives us Custom Vision, is the ability to export a model trained to be used on other platforms, without invoking Custom Vision own web service.

The 4 options available that we have today are

  • CoreML, iOS 11
  • TensorFlow, Android
  • ONNX, Windows ML
  • DockerFile, Azure IoT Edge, Azure Functions, AzureML

cv marvel export to ios tensorflow onnx dockerfile

I’ll share my experiences using the ONNX exported models being used in a Windows 10 Universal App.

The first thing we have to know is the version of Windows 10 with which we will work, because at the time of export we will see that we have 2 options

  • ONNX 1.0 for Windows 10 lower than 17738
  • ONNX 1.2 for Windows 10 higher than 17738

I am currently working with Win10 18317, so my examples will be for the ONNX version 1.2. The exported file is a zip that internally has the following files

  • CSharp\ObjectDetection.cs
  • python\cntk_predict.py
  • python\object_detection.py
  • labels.txt
  • model.onnx

The directories CSharp and Python have sample files to use the model with these languages. The file [labels.txt] contains the labels defined in the model, and finally the ONNX file is the model per se.

custom vision marvel onnx 1.2 exported files

For this example, I will use a blank App UWP with the following features

  • Added package NuGet Microsoft.Toolkit.Uwp.UI. Controls
  • Using the same, to access the webcam at the beginning of the app
  • We process each of the frames That are received from the webcam

Sample Code

At this point, we can now use our exported model to analyze images. We must add the file ONNX to our project, and configure the same to be a content and to be copied to the output build of our application.

An important detail here, is that if you have [Visual Studio Tools for AI] installed in Visual Studio, when you add this file the extension will automatically add a CS class to use with the model.  This class requires a lot of work to work, I recommend deleting it, as we will use as a base that is exported from Custom Vision, [ObjectDetection.cs].

custom vision marvel add onnx file to solution in vs

The file [ObjectDetection.cs] contains everything you need to use our model In a UWP App. At the start of the App we initialize the ONNX model, and in each Frame That is received from the camera will process the same to show the results in the window of Debug.

Now, for our app Work properly, you have to make a series of changes to the file [ObjectDetection.cs]. The changes are mainly related to the way in which WinML Processes the output when analyzing an image:

custom vision marvel uwp app running and analyzing

To be able to work this way, I added a new binding To process the output of the processing. This binding Respects the contract of ONNX with an array Long [1, 4].

This way we have no mistake of those “funny” that make you spend pleasant moments.

The full app can be seen in https://github.com/elbruno/events/tree/master/2019%2001%2010%20CodeMash%20CustomVision/CSharp/CustomVisionMarvelConsole01

Happy Coding!

Greetings @ Burlington

El Bruno

References

My Posts

Windows 10 and YOLOV2 for Object Detection Series