-
Notifications
You must be signed in to change notification settings - Fork 17
BlazorML5 Installation
Shivendra Pratap Singh edited this page Jun 1, 2022
·
4 revisions
Install The Nuget Package BlazorML5
Install-Package BlazorML5
on top of your .razor
file add always add
@using BlazorML5
@using BlazorML5.Helpers
@using BlazorML5.Image
@using BlazorML5.Text
@inject IJSRuntime runtime
Now on Initialize Lib
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await Ml5.InitAsync(runtime);
}
//on Server or MAUI Blazor
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (!firstRender)
return;
await Ml5.InitAsync(runtime);
}
Now create whatever model you want to use eg.
var p = await Ml5.PoseNetAsync(video);
you are good to go. API Reference follow Ml5 guidelines see here 🥇