YoloV8 5.3.0

Suggested Alternatives

YoloSharp

dotnet add package YoloV8 --version 5.3.0                
NuGet\Install-Package YoloV8 -Version 5.3.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="YoloV8" Version="5.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YoloV8 --version 5.3.0                
#r "nuget: YoloV8, 5.3.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.
// Install YoloV8 as a Cake Addin
#addin nuget:?package=YoloV8&version=5.3.0

// Install YoloV8 as a Cake Tool
#tool nuget:?package=YoloV8&version=5.3.0                

YoloV8

Use YOLO11 in real-time for object detection tasks, powered by ONNX Runtime.

Features

  • YOLO Tasks 🌟 Support for all YOLO vision tasks (Detect | OBB | Pose | Segment | Classify)
  • High Performance πŸš€ Various techniques and use of .NET features to maximize performance
  • Reduced Memory Usage 🧠 By reusing memory blocks and reducing the pressure on the GC
  • Plotting Options ✏️ Draw the predictions on the target image to preview the model results
  • YOLO Versions πŸ”§ Includes support for: YOLOv8 YOLOv10 YOLO11

Installation

This project provides two NuGet packages:

Usage

1. Export model to ONNX format:

For convert the pre-trained PyTorch model to ONNX format, run the following Python code:

from ultralytics import YOLO

# Load a model
model = YOLO('path/to/best.pt')

# Export the model to ONNX format
model.export(format='onnx')

2. Load the ONNX model with C#:

Add the YoloV8 (or YoloV8.Gpu) package to your project:

dotnet add package YoloV8

Use the following C# code to load the model and run basic prediction:

using Compunet.YoloV8;

// Load the YOLOv8 predictor
using var predictor = new YoloPredictor("path/to/model.onnx");

// Run model
var result = predictor.Detect("path/to/image.jpg");
// or
var result = await predictor.DetectAsync("path/to/image.jpg");

// Write result summary to terminal
Console.WriteLine(result);

Plotting

You can to plot the target image for preview the model results, this code demonstrates how to run a inference, plot the results on image and save to file:

using Compunet.YoloV8;
using Compunet.YoloV8.Plotting;
using SixLabors.ImageSharp;

// Load the YOLOv8 predictor
using var predictor = new YoloPredictor("path/to/model.onnx");

// Load the target image
using var image = Image.Load("path/to/image");

// Run model
var result = await predictor.PoseAsync(image);

// Create plotted image from model results
using var plotted = await result.PlotImageAsync(image);

// Write the plotted image to file
plotted.Save("./pose_demo.jpg");

You can also predict and save to file in one operation:

using Compunet.YoloV8;
using Compunet.YoloV8.Plotting;
using SixLabors.ImageSharp;

// Load the YOLOv8 predictor
using var predictor = new YoloPredictor("path/to/model.onnx");

// Run model, plot predictions and write to file
predictor.PredictAndSaveAsync("path/to/image");

Example Images:

Detection:

detect-demo!

Pose:

pose-demo!

Segmentation:

seg-demo!

License

AGPL-3.0 License

Important Note: This project depends on ImageSharp, you should check the license details here

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. 
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 YoloV8:

Repository Stars
babalae/better-genshin-impact
📦BetterGI · ζ›΄ε₯½ηš„εŽŸη₯ž - θ‡ͺεŠ¨ζ‹Ύε– | θ‡ͺεŠ¨ε‰§ζƒ… | ε…¨θ‡ͺεŠ¨ι’“ι±Ό(AI) | ε…¨θ‡ͺεŠ¨δΈƒεœ£ε¬ε”€ | θ‡ͺ动伐木 | θ‡ͺ动刷本 | θ‡ͺεŠ¨ι‡‡ι›†/ζŒ–ηŸΏ/ι”„εœ° | 一村龙 - UI Automation Testing Tools For Genshin Impact
Version Downloads Last updated
5.3.0 436 10/30/2024 5.3.0 is deprecated because it is no longer maintained.
5.2.0 418 10/16/2024
5.1.1 147 10/15/2024
5.1.0 481 10/8/2024
5.0.4 279 9/29/2024
5.0.3 138 9/26/2024
5.0.2 190 9/24/2024
5.0.1 985 9/15/2024
5.0.0 159 9/15/2024
4.2.0 765 8/23/2024
4.1.7 2,849 6/27/2024
4.1.6 605 6/10/2024
4.1.5 1,527 4/14/2024
4.1.4 163 4/14/2024
4.0.0 1,235 3/6/2024
3.1.1 594 2/4/2024
3.1.0 212 1/29/2024
3.0.0 1,588 11/27/2023
2.0.1 2,099 10/10/2023
2.0.0 382 9/27/2023
1.6.0 425 9/21/2023
1.5.0 379 9/15/2023
1.4.0 352 9/8/2023
1.3.0 1,535 8/29/2023
1.2.0 255 8/21/2023
1.0.1 233 8/16/2023
1.0.0 464 7/23/2023