DEV Community

Cover image for ML.NET Cat vs Dog
Pablito Piova
Pablito Piova

Posted on

ML.NET Cat vs Dog

ML.NET Model Builder is an intuitive graphical Visual Studio extension to build, train, and deploy custom machine learning models.
Model Builder uses automated machine learning (AutoML) to explore different machine learning algorithms and settings to help you find the one that best suits your scenario.

-Select Image Classification Scenario

Image description

-Select Trainning Environment

Image description

-Once you have chosen your scenario, Model Builder asks you to provide a dataset

Image description

-Train

Image description

-In my case, this training lasted a little over 4 hours

Image description

-Evaluate

Image description

Image description

Image description

-Consume

Image description

-Add solution ConsoleApp and WebApi

Image description

OPEN PowerShell and Test your WebAPI
$body = @{ImageSource = "Image location on your local machine"
Invoke-RestMethod "https://localhost:'PORT'/predict" -Method Post -Body ($body | ConvertTo-Json) -ContentType "application/json"

And that's it, in simple steps we create and consume a Machine Learning model. In the Documentation links you will see how to install the Model Builder extension in Visual Studio and everything related to ML.NET.

Happy coding!

Pablo Piovano.


DataSet: https://www.kaggle.com/muhammadshahzadkhan/dogvscat

ML.NET Documentation

GitHub: https://lnkd.in/duBTphVJ

Top comments (0)