Como fanático, enamorado y apasionado del mundo DotNet/DotNetCore (C#), durante las últimas semanas, he podido dedicar tiempo a incrementar mis Skills, tanto en Frontend (Angular) como en un nuevo lenguaje de backend (nodejs) y mucho, mucho Visual Studio Code.
Hasta ahora, siempre he sido totalmente autodidacta dedicando mucho esfuerzo en leer, usar Google, Stack Overflow y mucha practica (prueba + error), etc. Si bien, en esta ocasión, he decidido hacer un curso con el objetivo de profundizar mucho mas y conocer todo este nuevo mundo.
He de decir, que tras finalizarlo (32.5h codificando + pruebas personales, cacharreos varios, etc.) me siento muy satisfecho con lo aprendido. Tanto es así, que el día a día ya me ha llevado a proyectos reales por estos derroteros, facilitándome mucho el trabajo y, lo mas importante, ahorrándome tiempo.
The solution, was to use a tool and remove all the spaces and non-standard characters from my image data set. I also did all the labeling process again, and when I launched again my Object Recognition scenario from Model Builder, everything worked fine!
There is a new scenario available in ML.Net Model Builder for Visual Studio 2019: Object Detection. This scenario is not just image tagging, this scenario allows us to detect objects in an image, and get the specific coordinates and size of the detected objects. As usual, it requires a starting data set with images and labels.
Model Builder Object Detection
This one is super helpful and is also very easy to use. Let’s start with the 1st step
Add a new Machine Learning element in a Visual Studio project, and select Object Detection scenario.
This scenario only supports Azure training environment. Lucky me, I already have a Azure ML environment up and running (see references for my previous posts).
Next step is to define the data source for the scenario. In order to do this, we need to define an Image Labeling format file. The suggested tool to do this is VoTT (see references). You need to install the local version for VoTT. As far as I understand, for this Model Builder scenario, it only support VoTT projects using local files.
Define Source Images and Labels
For this post, I created a sample project using Fresh Food labels. Just 4
Important: The source connection will define the path where for the source images that will be used for labeling. Target connection defines the project location and also the path for the project exported file.
Once we defined our project properties, we can start defining tags and labeling our objects in the project images. This is a manual process, and it can be tedious.
Important: VoTT support custom detailed areas as the ones you see in the image below. For the Model Builder Scenario, these custom areas will be transformed into standard rectangles.
At any moment, you can save and export your project. This will generate a new folder in the [Target Connection] location named [vott-json-export]. In this folder we can find all the used and labeled images and also the exported JSON file that we will use on Visual Studio.
Back again in Visual Studio, we can select this file as the INPUT Json file for our scenario.
Train the Model
Everything is ready, let’s train the model, using Azure Compute ;D
The process is similar to the Image Classification scenario, it all start uploading the sources images to a Blob in Azure, and then launch 4 Azure ML Experiments
Once the process is complete, we can also check output metrics like Precision and Accuracy. This one is not the best model, however I consider this a great starting point for my demo blog.
If you want to know more about Azure ML, this is an great opportunity to play around with these experiments. The Script Experiment (Run 16 in the image) has a lot to dig, like the complete output log, some training python files, the generated ONNX model, and more.
Test and consume the generated Model
Back to Visual Studio we can check the model metrics and also the Best Model (I have so many questions here!).
And we can test the generated model. As you can see in the next images, using a threshold with value 50, the results are good. Still not detecting the rotten apple with the good ones, so I maybe need to figure out some strategies to improve my model.
Remember that all these features are still in preview, however they are an amazing starting point and tool to use and learn.
Blazor al igual que todas los tipos apps de .NET Core utilizan el archivo appsettings.json para guardar la configuración que queramos utilizar dentro de la App de tal manera que cuando esta configuración cambie la App cambie su comportamiento y se ajuste a la nueva configuración.
En Blazor el archivo de configuración debe crear en la carpeta wwwroot siguiendo el mismo patrón en .NET Core donde podemos también agregar el ambiente que representa la variable de entorno.
I will explain in detail 16 of my recommended parameters and its values for starting out a development environment with the intent of leaning towards a production design. Hope this can help kick start your…
Another blog post reminder, this time related on prerequisites to install dlib. And before start, a dlib description:
Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. It is used in both industry and academia in a wide range of domains including robotics, embedded devices, mobile phones, and large high performance computing environments. Dlib’s open source licensing allows you to use it in any application, free of charge.
Dlib is a key piece in computer vision processes, so every time I deploy a new Windows 10 instance, I need to install DLib and here are some prerequisites or, as I like to call them, lessons learned on the hard way.
Visual Studio for C++
One of the key requisites is [Visual Studio for C++]. In my default VS installation, I don’t install C++, here is my excuse to install this again.
Install CMake is an easy one, and somehow, I always forget to do this. More information in references section, and if you don’t know what’s CMake:
CMake is a cross-platform free and open-source software tool for managing the build process of software using a compiler-independent method. It supports directory hierarchies and applications that depend on multiple libraries. It is used in conjunction with native build environments such as Make, Qt Creator, Ninja, Apple’s Xcode, and Microsoft Visual Studio. It has minimal dependencies, requiring only a C++ compiler on its own build system.
Here it goes another post reminder, just for me. Every time I install a new Windows 10 instance, I need to search on how to add a .exe file as an application to the Windows Start Menu. So, I’ll use ZoomIt as the sample one and here are the steps.
Disclaimer: if you share your screen often, zoomit is a must have !
Right click on your ZoomIt executable file and create a shortcut on your desktop
Open the location [%AppData%\Microsoft\Windows\Start Menu\Programs]
Move the shortcut you created on the Desktop to the previous location
Now you can search for ZoomIt on the Start Menu Programs:
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.