Yolo Object Detection library for .NET 7. This one requires Cuda 11.7 and CudNN 8.4.1 to be installed to work, it will use your NVidia GPU for processing (which is many times faster than using the CPU version that is disabled in this release). Any GPU from Maxwell upwards is support (Cuda api 5.2+, Maxwell GPUs like GTX 750 and above). Since 11.1 it also supports OpenCV for more advanced features like tracking, shape detection, etc.
Includes the .dll files for Yolo Darknet Wrapper, Real-Time Object Detection (yolo core of AlexeyAB/darknet), including opencv_world460.dll and pthreadVC2.dll as needed by the yolo_cpp_dll implementation.
- Windows: should have Cuda 11.7 and CUDNN 8.3.2+ installed, if not an exception is thrown with detailed installation instructions. Environment path for cuda 11.7 must be set (installer does this), e.g. CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7
- If you get error: Could not load library cudnn_cnn_infer64_8.dll. Error code 126, Please follow this link for proper installation of CUDNN
- Linux x64: should have Cuda 11.7 and CUDNN 8.4.1+ installed, if not an exception is thrown with detailed installation instructions.
- Jetson Nano Arm64: should have Cuda 10.0 and CUDNN 8 installed, if not an exception is thrown with detailed installation instructions.
- Jetson Xavier Arm64: should have Cuda 10.2 and CUDNN 8 installed, if not an exception is thrown with detailed installation instructions.
The nuget installer includes all other needed files, for compiling it yourself, copy cudnn64_8.dll, opencv_world460.dll, pthreadVC2.dll into the FastYolo folder and compile yolo_cpp_dll.dll into it as well.
Current version is for .NET 7, you can check older releases for .NET6, .NET 5, .NET Core 3.1, .NET 4.6 and lower.
- Create C# Console project
- add the Nuget Package as a reference in your project
<ItemGroup>
<PackageReference Include="FastYolo" Version="11.7.3" />
</ItemGroup>
- open Program.cs file and paste the code below
- For complete examples please visit here
- YoloConfigFile is available here
- YoloWeightsFile is available here
- YoloClassesFile is available here
- ImageFilename is available here
YoloWrapper yoloWrapper = new YoloWrapper(YoloConfigFile, YoloWeightsFile, YoloClassesFile);
var image = Image.FromFile(ImageFilename);
using var memoryStream = new MemoryStream();
image.Save(memoryStream, image.RawFormat);
var byteArray = memoryStream.ToArray();
IEnumerable<YoloItem> yoloItems yoloWrapper.Detect(byteArray);
foreach (var item in yoloItems)
Console.WriteLine($"Object Found: {item.Name} with Shape: {item.Shape}, X: {item.X}, Y: {item.Y}, Width: {item.Width}, Height: {item.Height}");
For complete examples please visit here