All Projects → lobe → lobe.NET

lobe / lobe.NET

Licence: other
.NET library for lobe.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to lobe.NET

peachpie-samples
Sample projects demonstrating use of Peachpie - the PHP compiler and runtime for .NET
Stars: ✭ 44 (+10%)
Mutual labels:  dotnetcore
docker-why
Quick example of using SQL Server and .NET Core on Linux, loading data using bash
Stars: ✭ 41 (+2.5%)
Mutual labels:  dotnetcore
ExtCore-Sample
Full-featured ExtCore framework 7 sample web application
Stars: ✭ 29 (-27.5%)
Mutual labels:  dotnetcore
dotnet-upforgrabs
.NET Core Global Tool to help you get started with contributing to Open Source projects.
Stars: ✭ 50 (+25%)
Mutual labels:  dotnetcore
Okanshi
mvno.github.io/okanshi
Stars: ✭ 14 (-65%)
Mutual labels:  dotnetcore
ChatService
ChatService (SignalR).
Stars: ✭ 26 (-35%)
Mutual labels:  dotnetcore
maruko
maruko是一个基于dotnetcore的快速开发框架,他实现freesql,automap,模块化,DDD 设计思想等常用性功能.
Stars: ✭ 29 (-27.5%)
Mutual labels:  dotnetcore
lobe
Lobe is the world's first AI paralegal.
Stars: ✭ 22 (-45%)
Mutual labels:  lobe
depremkontrol
Simple demonstration of .NET Core 3.0 - BackgroundService to create long-running IHostedService applications
Stars: ✭ 13 (-67.5%)
Mutual labels:  dotnetcore
MrHuo.OAuth
.netcore 下最好用的第三方登录组件集合,集成了国内外大部分平台,欢迎使用。
Stars: ✭ 152 (+280%)
Mutual labels:  dotnetcore
ASPNETcoreAngularJWT
Angular in ASP.NET Core with JWT solution by systemjs
Stars: ✭ 48 (+20%)
Mutual labels:  dotnetcore
Home
Asp.net core Mvc Controls Toolkit
Stars: ✭ 33 (-17.5%)
Mutual labels:  dotnetcore
JT1078Gateway
基于Pipeline实现的JT1078Gateway支持TCP/UDP,目前只支持http-flv、ws-flv、hls三种拉流方式
Stars: ✭ 50 (+25%)
Mutual labels:  dotnetcore
JT809DotNetty
JT809DotNetty
Stars: ✭ 30 (-25%)
Mutual labels:  dotnetcore
Hisar
🏰 Hisar: Cross-Platform Modular Component Development Infrastructure
Stars: ✭ 19 (-52.5%)
Mutual labels:  dotnetcore
Health
App Metrics Health is an open-source and cross-platform .NET library used to define and report application health checks
Stars: ✭ 25 (-37.5%)
Mutual labels:  dotnetcore
EPAYMENT
EPayment - Multi Payment Provider for .Net Core
Stars: ✭ 43 (+7.5%)
Mutual labels:  dotnetcore
awesome-dotnet-async
A curated list of awesome articles and resources to learning and practicing about async, threading, and channels in .Net platform. 😉
Stars: ✭ 84 (+110%)
Mutual labels:  dotnetcore
BuildAMation
Build system and project generator for C/C++ desktop software development. Uses C# for build scripts. It is no longer under active development.
Stars: ✭ 13 (-67.5%)
Mutual labels:  dotnetcore
Cosmos.Identity
A Cosmos storage provider for ASP.NET Core Identity.
Stars: ✭ 26 (-35%)
Mutual labels:  dotnetcore

.NET libraries for Lobe

A .NET library to run inference on exported Lobe models.

How to get started

Export the model from Lobe app

  • Export your model as ONNX format

Use the model in your own .NET application

Install the follwing packages

  • lobe.Onnx to import the Onnx based implementation of the image classifier.
  • lobe.ImageSharp to get image manipulation utilities
  • Microsoft.ML.OnnxRuntime to get he native onnx runtimes

This code creates a simple command line app that loads a model and classifies an image file

using System;
using System.IO;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using lobe.ImageSharp;

namespace lobe.TestApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var signatureFilePath = args[0];
            var imageToClassify = args[1];

            ImageClassifier.Register("onnx", () => new OnnxImageClassifier());
            using var classifier = ImageClassifier.CreateFromSignatureFile(
                new FileInfo(signatureFilePath));

            var results = classifier.Classify(Image
                .Load(imageToClassify).CloneAs<Rgb24>());
            Console.WriteLine(results.Classification.Label);
        }
    }
}

The code

ImageClassifier.Register("onnx", () => new OnnxImageClassifier());

Registers the OnnxImageClassifier against the format onnx

Then a classifier can be built from a signature file

using var classifier = ImageClassifier.CreateFromSignatureFile(new FileInfo(signatureFilePath));

Use the lobe app directly

For rapid iterations you can test you model taking advantage of the http endpoint that the lobe app exposes. First open the app and then the model you want to use. Next got to export menu and select the api option, get the url from there (it should look like http://localhost:38100/predict/bdff75cc-ee54-46cf-a290-f9095ef78516").

In your .NET App make sure you ahve installed the following nuget packages

  • lobe.Http
  • lobe.ImageSharp

Then import the namespaces

using System.IO;
using SixLabors.ImageSharp;

using lobe.Http;

And finally create the client, connect to the endpoint and now use it classify the image

var client = new LobeClient();
client.UseUri(new Uri("http://localhost:38100/predict/bdff75cc-ee54-46cf-a290-f9095ef78516"));

var result = client.Classify(picture.CloneAs<Rgb24>());
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].