OnnxStack.Core 0.60.0

Prefix Reserved
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package OnnxStack.Core --version 0.60.0
                    
NuGet\Install-Package OnnxStack.Core -Version 0.60.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OnnxStack.Core" Version="0.60.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OnnxStack.Core" Version="0.60.0" />
                    
Directory.Packages.props
<PackageReference Include="OnnxStack.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OnnxStack.Core --version 0.60.0
                    
#r "nuget: OnnxStack.Core, 0.60.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OnnxStack.Core@0.60.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OnnxStack.Core&version=0.60.0
                    
Install as a Cake Addin
#tool nuget:?package=OnnxStack.Core&version=0.60.0
                    
Install as a Cake Tool

OnnxStack.Core - Onnx Services for .NET Applications

OnnxStack.Core is a library that provides simplified wrappers for OnnxRuntime

Getting Started

OnnxStack.Core can be found via the nuget package manager, download and install it.

PM> Install-Package OnnxStack.Core

Dependencies

Video processing support requires FFMPEG and FFPROBE binaries, files must be present in your output folder or the destinations configured at runtime

https://ffbinaries.com/downloads
https://github.com/ffbinaries/ffbinaries-prebuilt/releases/download/v6.1/ffmpeg-6.1-win-64.zip
https://github.com/ffbinaries/ffbinaries-prebuilt/releases/download/v6.1/ffprobe-6.1-win-64.zip

OnnxModelSession Example


// CLIP Tokenizer Example
//----------------------//

// Model Configuration
var config = new OnnxModelConfig
{
    DeviceId = 0,
    InterOpNumThreads = 0,
    IntraOpNumThreads = 0,
    ExecutionMode = ExecutionMode.ORT_SEQUENTIAL,
    ExecutionProvider = ExecutionProvider.DirectML,
    OnnxModelPath = "cliptokenizer.onnx"
};

// Create Model Session
var modelSession = new OnnxModelSession(config);

// Get Metatdata
var modelMetadata = await modelSession.GetMetadataAsync();

// Create Input Tensor
var text = "Text To Tokenize";
var inputTensor = new DenseTensor<string>(new string[] { text }, new int[] { 1 });

// Create Inference Parameters
using (var inferenceParameters = new OnnxInferenceParameters(modelMetadata))
{
    // Set Inputs and Outputs
    inferenceParameters.AddInputTensor(inputTensor);
    inferenceParameters.AddOutputBuffer();

    // Run Inference
    using (var results = modelSession.RunInference(inferenceParameters))
    {
        // Extract Result Tokens
        var resultData = results[0].ToArray<long>();
    }
}

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on OnnxStack.Core:

Repository Stars
saddam213/OnnxStack
C# Stable Diffusion using ONNX Runtime
Version Downloads Last Updated
Loading failed