Run YOLO11 in .NET and leave the Python scripts behind
YoloSharp exists so .NET applications can run Ultralytics YOLO models for detection, segmentation, and pose estimation without maintaining a Python sidecar.

What it does
YoloSharp loads ONNX exports from Ultralytics and exposes them through a straightforward C# API. It handles the full set of YOLO vision tasks—object detection, oriented bounding boxes, instance segmentation, pose estimation, and classification—and can plot bounding boxes, masks, and keypoints onto images via ImageSharp. The library ships as CPU, GPU, or core-only packages depending on how many runtime dependencies you want to carry.
The interesting bit
The author tuned the library specifically for .NET performance by reusing memory blocks to reduce garbage collection pressure. That is exactly the kind of unglamorous optimization that keeps real-time inference from stuttering inside a desktop or server process.
Key highlights
- Supports YOLOv8 through YOLOv12 (plus YOLO26) across all five Ultralytics task types
- Three NuGet package tiers: CPU inference, GPU inference, or a runtime-free core for custom deployments
- Built-in plotting that renders predictions directly onto
ImageSharpimages - Memory-conscious design that reuses buffers to keep the GC quiet during repeated inference
Caveats
- No batch processing; images must be handled one at a time
- Input dimensions are locked to the model’s
imgszvalue, so dynamic sizing is not supported - AGPL-3.0 license, and it depends on ImageSharp, which has its own licensing caveats
Verdict
A solid choice if you need in-process YOLO inference inside a .NET app and want to avoid interop with Python. Look elsewhere if you need batched GPU throughput or a permissive open-source license.
Frequently asked
- What is dme-compunet/YoloSharp?
- YoloSharp exists so .NET applications can run Ultralytics YOLO models for detection, segmentation, and pose estimation without maintaining a Python sidecar.
- Is YoloSharp open source?
- Yes — dme-compunet/YoloSharp is open source, released under the AGPL-3.0 license.
- What language is YoloSharp written in?
- dme-compunet/YoloSharp is primarily written in C#.
- How popular is YoloSharp?
- dme-compunet/YoloSharp has 560 stars on GitHub.
- Where can I find YoloSharp?
- dme-compunet/YoloSharp is on GitHub at https://github.com/dme-compunet/YoloSharp.