基本信息
源码名称:C# Opencvsharp+OnnxRuntime+YOLOV5net 实时检测(最快速的目标检测)
源码大小:335.27M
文件格式:.rar
开发语言:C#
更新时间:2022-07-14
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 10 元 
   源码介绍

C# Opencvsharp OnnxRuntime YOLOV5net 实时检测(最快速的目标检测)

本文基于yolov5net Microsoft.ML.OnnxRuntime 框架  用opencvsharp进行视频转换

先是引用yolov5net(网上有教程) 安装Microsoft.ML.OnnxRuntime 安装opengcvsharp4

1、用OpengCV所视频转换成Mt对象,

2、将Mt对像转转变成图片

3、利用yolov5net Microsoft.ML.OnnxRuntime进行图像识别并标注(这里需要一个YOLOV5 ONNX的模型文件,包括在附件包里,需要检测其他东西只需要更换模型文件即可,网上可以下载)

5、将标注完成的图像在控件上显示

通过Microsoft.ML.OnnxRuntime推理机加速,比我之前发的opengcvshar yolov3的FPS高出了不少

//包含模型文件共有700M  所以下载分有点高,理解!如果像提高视频流畅度只需要提高帧率间隔就行了 自行研究了!

.
├── C# Opencvsharp OnnxRuntime YOLOV5net 实时检测(最快速的目标检测).rar
└── WindowsFormsApp1
    ├── Onnx ylov5Net opengcvsharp.sln
    ├── WindowsFormsApp1
    │   ├── App.config
    │   ├── Form1.Designer.cs
    │   ├── Form1.cs
    │   ├── Form1.resx
    │   ├── Onnx ylov5Net opengcvsharp.csproj
    │   ├── Program.cs
    │   ├── Properties
    │   │   ├── AssemblyInfo.cs
    │   │   ├── Resources.Designer.cs
    │   │   ├── Resources.resx
    │   │   ├── Settings.Designer.cs
    │   │   └── Settings.settings
    │   ├── bin
    │   │   └── Debug
    │   │       ├── Assets
    │   │       │   ├── Weights
    │   │       │   │   ├── yolov5n.onnx
    │   │       │   │   ├── yolov5n6.onnx
    │   │       │   │   └── yolov5s.onnx
    │   │       │   ├── result.jpg
    │   │       │   └── test.jpg
    │   │       ├── Microsoft.ML.OnnxRuntime.dll
    │   │       ├── Microsoft.ML.OnnxRuntime.pdb
    │   │       ├── OpenCvSharp.Blob.dll
    │   │       ├── OpenCvSharp.Blob.pdb
    │   │       ├── OpenCvSharp.Blob.xml
    │   │       ├── OpenCvSharp.Extensions.dll
    │   │       ├── OpenCvSharp.Extensions.pdb
    │   │       ├── OpenCvSharp.Extensions.xml
    │   │       ├── OpenCvSharp.UserInterface.dll
    │   │       ├── OpenCvSharp.UserInterface.pdb
    │   │       ├── OpenCvSharp.UserInterface.xml
    │   │       ├── OpenCvSharp.dll
    │   │       ├── OpenCvSharp.xml
    │   │       ├── OpenCvSharpExtern.dll
    │   │       ├── System.Buffers.dll
    │   │       ├── System.Buffers.xml
    │   │       ├── System.Drawing.Common.dll
    │   │       ├── System.Memory.dll
    │   │       ├── System.Memory.xml
    │   │       ├── System.Numerics.Vectors.dll
    │   │       ├── System.Numerics.Vectors.xml
    │   │       ├── System.Runtime.CompilerServices.Unsafe.dll
    │   │       ├── System.Runtime.CompilerServices.Unsafe.xml
    │   │       ├── WindowsFormsApp1.exe
    │   │       ├── WindowsFormsApp1.exe.config
    │   │       ├── WindowsFormsApp1.pdb
    │   │       ├── Yolov5Net.Scorer.dll
    │   │       ├── dll
    │   │       │   ├── x64
    │   │       │   │   ├── OpenCvSharpExtern.dll
    │   │       │   │   ├── opencv_ffmpeg400_64.dll
    │   │       │   │   └── opencv_videoio_ffmpeg455_64.dll
    │   │       │   └── x86
    │   │       │       ├── OpenCvSharpExtern.dll
    │   │       │       ├── opencv_ffmpeg400.dll
    │   │       │       └── opencv_videoio_ffmpeg455.dll
    │   │       ├── onnxruntime.dll
    │   │       ├── onnxruntime_providers_shared.dll
    │   │       └── opencv_ffmpeg400.dll
    │   ├── obj
    │   │   └── Debug
    │   │       ├── DesignTimeResolveAssemblyReferences.cache
    │   │       ├── DesignTimeResolveAssemblyReferencesInput.cache
    │   │       ├── Onnx ylov5Net opengcvsharp.csproj.CoreCompileInputs.cache
    │   │       ├── TempPE
    │   │       ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
    │   │       ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
    │   │       ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
    │   │       ├── WindowsFormsApp1.Form1.resources
    │   │       ├── WindowsFormsApp1.Properties.Resources.resources
    │   │       ├── WindowsFormsApp1.csproj.CopyComplete
    │   │       ├── WindowsFormsApp1.csproj.CoreCompileInputs.cache
    │   │       ├── WindowsFormsApp1.csproj.FileListAbsolute.txt
    │   │       ├── WindowsFormsApp1.csproj.GenerateResource.cache
    │   │       ├── WindowsFormsApp1.csprojAssemblyReference.cache
    │   │       ├── WindowsFormsApp1.exe
    │   │       └── WindowsFormsApp1.pdb
    │   └── packages.config
    └── packages
        ├── Microsoft.ML.OnnxRuntime.1.9.0
        │   ├── LICENSE.txt
        │   ├── Microsoft.ML.OnnxRuntime.1.9.0.nupkg
        │   ├── Privacy.md
        │   ├── ThirdPartyNotices.txt
        │   ├── build
        │   │   ├── native
        │   │   │   ├── Microsoft.ML.OnnxRuntime.props
        │   │   │   ├── Microsoft.ML.OnnxRuntime.targets
        │   │   │   └── include
        │   │   │       ├── cpu_provider_factory.h
        │   │   │       ├── onnxruntime_c_api.h
        │   │   │       ├── onnxruntime_cxx_api.h
        │   │   │       ├── onnxruntime_cxx_inline.h
        │   │   │       ├── onnxruntime_run_options_config_keys.h
        │   │   │       ├── onnxruntime_session_options_config_keys.h
        │   │   │       └── provider_options.h
        │   │   ├── netstandard1.1
        │   │   │   ├── Microsoft.ML.OnnxRuntime.props
        │   │   │   └── Microsoft.ML.OnnxRuntime.targets
        │   │   └── netstandard2.0
        │   │       ├── Microsoft.ML.OnnxRuntime.props
        │   │       └── Microsoft.ML.OnnxRuntime.targets
        │   └── runtimes
        │       ├── linux-x64
        │       │   └── native
        │       │       └── libonnxruntime.so
        │       ├── osx.10.14-x64
        │       │   └── native
        │       │       └── libonnxruntime.dylib
        │       ├── win-arm
        │       │   └── native
        │       │       ├── onnxruntime.dll
        │       │       ├── onnxruntime.lib
        │       │       ├── onnxruntime_providers_shared.dll
        │       │       └── onnxruntime_providers_shared.lib
        │       ├── win-arm64
        │       │   └── native
        │       │       ├── onnxruntime.dll
        │       │       ├── onnxruntime.lib
        │       │       ├── onnxruntime_providers_shared.dll
        │       │       └── onnxruntime_providers_shared.lib
        │       ├── win-x64
        │       │   └── native
        │       │       ├── onnxruntime.dll
        │       │       ├── onnxruntime.lib
        │       │       ├── onnxruntime_providers_shared.dll
        │       │       └── onnxruntime_providers_shared.lib
        │       └── win-x86
        │           └── native
        │               ├── onnxruntime.dll
        │               ├── onnxruntime.lib
        │               ├── onnxruntime_providers_shared.dll
        │               └── onnxruntime_providers_shared.lib
        ├── Microsoft.ML.OnnxRuntime.Managed.1.9.0
        │   ├── LICENSE.txt
        │   ├── Microsoft.ML.OnnxRuntime.Managed.1.9.0.nupkg
        │   ├── Privacy.md
        │   ├── ThirdPartyNotices.txt
        │   ├── build
        │   │   ├── netstandard1.1
        │   │   │   └── Microsoft.ML.OnnxRuntime.Managed.targets
        │   │   └── netstandard2.0
        │   │       └── Microsoft.ML.OnnxRuntime.Managed.targets
        │   └── lib
        │       ├── netstandard1.1
        │       │   ├── Microsoft.ML.OnnxRuntime.dll
        │       │   └── Microsoft.ML.OnnxRuntime.pdb
        │       └── netstandard2.0
        │           ├── Microsoft.ML.OnnxRuntime.dll
        │           └── Microsoft.ML.OnnxRuntime.pdb
        ├── OpenCvSharp3-AnyCPU.4.0.0.20181129
        │   ├── OpenCvSharp3-AnyCPU.4.0.0.20181129.nupkg
        │   ├── build
        │   │   └── OpenCvSharp3-AnyCPU.props
        │   ├── lib
        │   │   ├── net20
        │   │   │   ├── OpenCvSharp.Blob.dll
        │   │   │   ├── OpenCvSharp.Blob.pdb
        │   │   │   ├── OpenCvSharp.Blob.xml
        │   │   │   ├── OpenCvSharp.dll
        │   │   │   ├── OpenCvSharp.pdb
        │   │   │   └── OpenCvSharp.xml
        │   │   ├── net40
        │   │   │   ├── OpenCvSharp.Blob.dll
        │   │   │   ├── OpenCvSharp.Blob.pdb
        │   │   │   ├── OpenCvSharp.Blob.xml
        │   │   │   ├── OpenCvSharp.Extensions.dll
        │   │   │   ├── OpenCvSharp.Extensions.pdb
        │   │   │   ├── OpenCvSharp.Extensions.xml
        │   │   │   ├── OpenCvSharp.UserInterface.dll
        │   │   │   ├── OpenCvSharp.UserInterface.pdb
        │   │   │   ├── OpenCvSharp.UserInterface.xml
        │   │   │   ├── OpenCvSharp.dll
        │   │   │   ├── OpenCvSharp.pdb
        │   │   │   └── OpenCvSharp.xml
        │   │   ├── net461
        │   │   │   ├── OpenCvSharp.Blob.dll
        │   │   │   ├── OpenCvSharp.Blob.pdb
        │   │   │   ├── OpenCvSharp.Blob.xml
        │   │   │   ├── OpenCvSharp.Extensions.dll
        │   │   │   ├── OpenCvSharp.Extensions.pdb
        │   │   │   ├── OpenCvSharp.Extensions.xml
        │   │   │   ├── OpenCvSharp.UserInterface.dll
        │   │   │   ├── OpenCvSharp.UserInterface.pdb
        │   │   │   ├── OpenCvSharp.UserInterface.xml
        │   │   │   ├── OpenCvSharp.dll
        │   │   │   ├── OpenCvSharp.pdb
        │   │   │   └── OpenCvSharp.xml
        │   │   └── netstandard2.0
        │   │       ├── OpenCvSharp.Blob.dll
        │   │       ├── OpenCvSharp.Blob.pdb
        │   │       ├── OpenCvSharp.Blob.xml
        │   │       ├── OpenCvSharp.Extensions.dll
        │   │       ├── OpenCvSharp.Extensions.pdb
        │   │       ├── OpenCvSharp.Extensions.xml
        │   │       ├── OpenCvSharp.dll
        │   │       ├── OpenCvSharp.pdb
        │   │       └── OpenCvSharp.xml
        │   └── runtimes
        │       ├── win10-x64
        │       │   └── native
        │       │       ├── OpenCvSharpExtern.dll
        │       │       └── opencv_ffmpeg400_64.dll
        │       └── win10-x86
        │           └── native
        │               ├── OpenCvSharpExtern.dll
        │               └── opencv_ffmpeg400.dll
        ├── OpenCvSharp4.4.6.0.20220608
        │   ├── OpenCvSharp4.4.6.0.20220608.nupkg
        │   └── lib
        │       ├── net48
        │       │   ├── OpenCvSharp.dll
        │       │   └── OpenCvSharp.xml
        │       ├── net6.0
        │       │   ├── OpenCvSharp.dll
        │       │   └── OpenCvSharp.xml
        │       ├── netcoreapp3.1
        │       │   ├── OpenCvSharp.dll
        │       │   └── OpenCvSharp.xml
        │       ├── netstandard2.0
        │       │   ├── OpenCvSharp.dll
        │       │   └── OpenCvSharp.xml
        │       └── netstandard2.1
        │           ├── OpenCvSharp.dll
        │           └── OpenCvSharp.xml
        ├── OpenCvSharp4.Windows.4.6.0.20220608
        │   └── OpenCvSharp4.Windows.4.6.0.20220608.nupkg
        ├── OpenCvSharp4.runtime.win.4.6.0.20220608
        │   ├── OpenCvSharp4.runtime.win.4.6.0.20220608.nupkg
        │   ├── build
        │   │   ├── net48
        │   │   │   └── OpenCvSharp4.runtime.win.props
        │   │   ├── net5.0
        │   │   │   └── OpenCvSharp4.runtime.win.props
        │   │   ├── netcoreapp
        │   │   │   └── OpenCvSharp4.runtime.win.props
        │   │   └── netstandard
        │   │       └── OpenCvSharp4.runtime.win.props
        │   └── runtimes
        │       ├── win-x64
        │       │   └── native
        │       │       ├── OpenCvSharpExtern.dll
        │       │       └── opencv_videoio_ffmpeg460_64.dll
        │       └── win-x86
        │           └── native
        │               ├── OpenCvSharpExtern.dll
        │               └── opencv_videoio_ffmpeg460.dll
        ├── System.Buffers.4.5.1
        │   ├── LICENSE.TXT
        │   ├── System.Buffers.4.5.1.nupkg
        │   ├── THIRD-PARTY-NOTICES.TXT
        │   ├── lib
        │   │   ├── net461
        │   │   │   ├── System.Buffers.dll
        │   │   │   └── System.Buffers.xml
        │   │   ├── netcoreapp2.0
        │   │   │   └── _._
        │   │   ├── netstandard1.1
        │   │   │   ├── System.Buffers.dll
        │   │   │   └── System.Buffers.xml
        │   │   ├── netstandard2.0
        │   │   │   ├── System.Buffers.dll
        │   │   │   └── System.Buffers.xml
        │   │   └── uap10.0.16299
        │   │       └── _._
        │   ├── ref
        │   │   ├── net45
        │   │   │   ├── System.Buffers.dll
        │   │   │   └── System.Buffers.xml
        │   │   ├── netcoreapp2.0
        │   │   │   └── _._
        │   │   ├── netstandard1.1
        │   │   │   ├── System.Buffers.dll
        │   │   │   └── System.Buffers.xml
        │   │   ├── netstandard2.0
        │   │   │   ├── System.Buffers.dll
        │   │   │   └── System.Buffers.xml
        │   │   └── uap10.0.16299
        │   │       └── _._
        │   ├── useSharedDesignerContext.txt
        │   └── version.txt
        ├── System.Drawing.Common.5.0.2
        │   ├── Icon.png
        │   ├── LICENSE.TXT
        │   ├── System.Drawing.Common.5.0.2.nupkg
        │   ├── THIRD-PARTY-NOTICES.TXT
        │   ├── lib
        │   │   ├── MonoAndroid10
        │   │   │   └── _._
        │   │   ├── MonoTouch10
        │   │   │   └── _._
        │   │   ├── net461
        │   │   │   └── System.Drawing.Common.dll
        │   │   ├── netcoreapp3.0
        │   │   │   ├── System.Drawing.Common.dll
        │   │   │   └── System.Drawing.Common.xml
        │   │   ├── netstandard2.0
        │   │   │   └── System.Drawing.Common.dll
        │   │   ├── xamarinios10
        │   │   │   └── _._
        │   │   ├── xamarinmac20
        │   │   │   └── _._
        │   │   ├── xamarintvos10
        │   │   │   └── _._
        │   │   └── xamarinwatchos10
        │   │       └── _._
        │   ├── ref
        │   │   ├── MonoAndroid10
        │   │   │   └── _._
        │   │   ├── MonoTouch10
        │   │   │   └── _._
        │   │   ├── net461
        │   │   │   └── System.Drawing.Common.dll
        │   │   ├── netcoreapp3.0
        │   │   │   ├── System.Drawing.Common.dll
        │   │   │   └── System.Drawing.Common.xml
        │   │   ├── netstandard2.0
        │   │   │   └── System.Drawing.Common.dll
        │   │   ├── xamarinios10
        │   │   │   └── _._
        │   │   ├── xamarinmac20
        │   │   │   └── _._
        │   │   ├── xamarintvos10
        │   │   │   └── _._
        │   │   └── xamarinwatchos10
        │   │       └── _._
        │   ├── runtimes
        │   │   ├── unix
        │   │   │   └── lib
        │   │   │       ├── netcoreapp2.0
        │   │   │       │   └── System.Drawing.Common.dll
        │   │   │       └── netcoreapp3.0
        │   │   │           ├── System.Drawing.Common.dll
        │   │   │           └── System.Drawing.Common.xml
        │   │   └── win
        │   │       └── lib
        │   │           ├── netcoreapp2.0
        │   │           │   └── System.Drawing.Common.dll
        │   │           └── netcoreapp3.0
        │   │               ├── System.Drawing.Common.dll
        │   │               └── System.Drawing.Common.xml
        │   ├── useSharedDesignerContext.txt
        │   └── version.txt
        ├── System.Memory.4.5.4
        │   ├── LICENSE.TXT
        │   ├── System.Memory.4.5.4.nupkg
        │   ├── THIRD-PARTY-NOTICES.TXT
        │   ├── lib
        │   │   ├── net461
        │   │   │   ├── System.Memory.dll
        │   │   │   └── System.Memory.xml
        │   │   ├── netcoreapp2.1
        │   │   │   └── _._
        │   │   ├── netstandard1.1
        │   │   │   ├── System.Memory.dll
        │   │   │   └── System.Memory.xml
        │   │   └── netstandard2.0
        │   │       ├── System.Memory.dll
        │   │       └── System.Memory.xml
        │   ├── ref
        │   │   └── netcoreapp2.1
        │   │       └── _._
        │   ├── useSharedDesignerContext.txt
        │   └── version.txt
        ├── System.Numerics.Vectors.4.5.0
        │   ├── LICENSE.TXT
        │   ├── System.Numerics.Vectors.4.5.0.nupkg
        │   ├── THIRD-PARTY-NOTICES.TXT
        │   ├── lib
        │   │   ├── MonoAndroid10
        │   │   │   └── _._
        │   │   ├── MonoTouch10
        │   │   │   └── _._
        │   │   ├── net46
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── netcoreapp2.0
        │   │   │   └── _._
        │   │   ├── netstandard1.0
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── netstandard2.0
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── portable-net45 win8 wp8 wpa81
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── uap10.0.16299
        │   │   │   └── _._
        │   │   ├── xamarinios10
        │   │   │   └── _._
        │   │   ├── xamarinmac20
        │   │   │   └── _._
        │   │   ├── xamarintvos10
        │   │   │   └── _._
        │   │   └── xamarinwatchos10
        │   │       └── _._
        │   ├── ref
        │   │   ├── MonoAndroid10
        │   │   │   └── _._
        │   │   ├── MonoTouch10
        │   │   │   └── _._
        │   │   ├── net45
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── net46
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── netcoreapp2.0
        │   │   │   └── _._
        │   │   ├── netstandard1.0
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── netstandard2.0
        │   │   │   ├── System.Numerics.Vectors.dll
        │   │   │   └── System.Numerics.Vectors.xml
        │   │   ├── uap10.0.16299
        │   │   │   └── _._
        │   │   ├── xamarinios10
        │   │   │   └── _._
        │   │   ├── xamarinmac20
        │   │   │   └── _._
        │   │   ├── xamarintvos10
        │   │   │   └── _._
        │   │   └── xamarinwatchos10
        │   │       └── _._
        │   ├── useSharedDesignerContext.txt
        │   └── version.txt
        ├── System.Runtime.CompilerServices.Unsafe.6.0.0
        │   ├── Icon.png
        │   ├── LICENSE.TXT
        │   ├── System.Runtime.CompilerServices.Unsafe.6.0.0.nupkg
        │   ├── THIRD-PARTY-NOTICES.TXT
        │   ├── buildTransitive
        │   │   ├── netcoreapp2.0
        │   │   │   └── System.Runtime.CompilerServices.Unsafe.targets
        │   │   └── netcoreapp3.1
        │   │       └── _._
        │   ├── lib
        │   │   ├── net461
        │   │   │   ├── System.Runtime.CompilerServices.Unsafe.dll
        │   │   │   └── System.Runtime.CompilerServices.Unsafe.xml
        │   │   ├── net6.0
        │   │   │   ├── System.Runtime.CompilerServices.Unsafe.dll
        │   │   │   └── System.Runtime.CompilerServices.Unsafe.xml
        │   │   ├── netcoreapp3.1
        │   │   │   ├── System.Runtime.CompilerServices.Unsafe.dll
        │   │   │   └── System.Runtime.CompilerServices.Unsafe.xml
        │   │   └── netstandard2.0
        │   │       ├── System.Runtime.CompilerServices.Unsafe.dll
        │   │       └── System.Runtime.CompilerServices.Unsafe.xml
        │   └── useSharedDesignerContext.txt
        └── Yolov5Net.1.0.9
            ├── Yolov5Net.1.0.9.nupkg
            └── lib
                └── netstandard2.0
                    └── Yolov5Net.Scorer.dll

161 directories, 301 files