OpenVINO.CSharp.API.Extensions
1.0.2
dotnet add package OpenVINO.CSharp.API.Extensions --version 1.0.2
NuGet\Install-Package OpenVINO.CSharp.API.Extensions -Version 1.0.2
<PackageReference Include="OpenVINO.CSharp.API.Extensions" Version="1.0.2" />
paket add OpenVINO.CSharp.API.Extensions --version 1.0.2
#r "nuget: OpenVINO.CSharp.API.Extensions, 1.0.2"
// Install OpenVINO.CSharp.API.Extensions as a Cake Addin #addin nuget:?package=OpenVINO.CSharp.API.Extensions&version=1.0.2 // Install OpenVINO.CSharp.API.Extensions as a Cake Tool #tool nuget:?package=OpenVINO.CSharp.API.Extensions&version=1.0.2
📚 简介(Introduction)
英特尔发行版 OpenVINO™工具套件基于oneAPI 而开发,可以加快高性能计算机视觉和深度学习视觉应用开发速度工具套件,适用于从边缘到云的各种英特尔平台上,帮助用户更快地将更准确的真实世界结果部署到生产系统中。通过简化的开发工作流程, OpenVINO™可赋能开发者在现实世界中部署高性能应用程序和算法。
然而 OpenVINO™未提供 C# 语言接口,这对在 C# 中使用 OpenVINO™ 带来了很多麻烦,对此推出了 OpenVINO™ C# API,旨在推动 OpenVINO™在C#领域的应用,目前 OpenVINO™ C# API 已经更新迭代起到 csharp3.1 版本,相比于之前版本,OpenVINO™ C# API 3.1 版本做了较大程度上的更新.
在OpenVINO™ C# API 3.0 版本时,由原来的重构 C++ API 改为直接读取 OpenVINO™ 官方 C API,使得应用更加灵活,所支持的功能更加丰富。OpenVINO™ C# API 3.0 接口参考 OpenVINO™ C++ API 来实现,因此在使用时更加接近 C++ API,这对熟悉使用C++ API的朋友会更加友好。
当前推出的最新版本为 OpenVINO™ C# API 3.1 预发布版本,该版本在 3.0 版本上进行了进一步更新,完善了所有测试代码,并改进了一些错误,后续将根据最新版推出相关的案例项目与应用。
最后,如果各位在使用中有什么问题,可以与我沟通联系,也欢迎广大C#开发者加入到OpenVINO™ C# API 开发中。
Intel Distribution [OpenVINO™](www.openvino. ai) tool suite is developed based on the oneAPI and can accelerate the development speed of high-performance computer vision and deep learning visual applications. It is suitable for various Intel platforms from the edge to the cloud, helping users deploy more accurate real-world results to production systems faster. By simplifying the development workflow, OpenVINO™ Empowering developers to deploy high-performance applications and algorithms in the real world.
However, OpenVINO™ does not provide a C # language interface, which brings a lot of trouble to using OpenVINO™ in C #. Therefore, OpenVINO™ C# API has been launched to promote the application of OpenVINO™ in the C # field. Currently, OpenVINO™ C# API has been updated and iterated to **csharp3.1 ** version, and compared to the previous version, OpenVINO™ C# API 3.1 has undergone significant updates
In version 3.0 of OpenVINO™ C# API, the original refactoring of the C++API was changed to directly reading the official C API of OpenVINO™, making the application more flexible and supporting a richer range of functions. The OpenVINO™ C# API 3.0 interface is implemented based on OpenVINO™ C# API, so it is closer to the C++API when used, which is more friendly for friends who are familiar with using the C++API.
The latest version currently released is **OpenVINO™ C# API 3.1 ** pre release version, which has been further updated on version 3.0, improving all test codes and addressing some errors. Relevant case projects and applications will be released based on the latest version in the future.
Finally, if you have any questions during use, you can communicate and contact me. We also welcome C # developers to join us in OpenVINO™ C# API development.
NuGet Package
Core Managed Libraries
Native Runtime Libraries
Integration Library
Package | Description | Link |
---|---|---|
OpenVINO.CSharp.Windows | All-in-one package for Windows |
⚙ 如何安装(Installation )
以下提供了OpenVINO™ C# API在不同平台的安装方法,可以根据自己使用平台进行安装。
The following provides installation methods for OpenVINO™ C# API on different platforms, which can be installed according to your own platform.
Windows
通过dotnet add package
指令安装或通过Visual Studio安装以下程序包
dotnet add package OpenVINO.CSharp.API
dotnet add package OpenVINO.runtime.win
或者安装集成包——>
dotnet add package OpenVINO.CSharp.Windows
Linux
linux平台我们根据官方编译的平台制作了对应的NuGet Package,以ubuntu.22-x86_64为例,通过dotnet add package
指令安装:
dotnet add package OpenVINO.CSharp.API
dotnet add package OpenVINO.runtime.ubuntu.22-x86_64
运行一次程序后,添加环境变量:
export LD_LIBRARY_PATH={Program generated executable file directory}/runtimes/ubuntu.22-x86_64/native
例如——>
export LD_LIBRARY_PATH=/home/ygj/Program/sample1/bin/Debug/net6.0/runtimes/ubuntu.22-x86_64/native
如果对于一个全新平台(未安装过OpenVINO C++),需要安装一下依赖环境,切换到{Program generated executable file directory}/runtimes/ubuntu.22-x86_64/native
目录下,运行以下指令:
sudo -E ./install_openvino_dependencies.sh
Mac OS
通过dotnet add package
指令安装以下程序包
dotnet add package OpenVINO.CSharp.API
dotnet add package OpenVINO.runtime.macos-arm64
🏷开始使用(Usage)
如果你不知道如何使用,通过下面代码简单了解使用方法。
If you don't know how to use it, simply understand the usage method through the following code.
using OpenVinoSharp; // 引用命名空间
namespace test
{
internal class Program
{
static void Main(string[] args)
{
using Core core = new Core(); // 初始化 Core 核心
using Model model = core.read_model("./model.xml"); // 读取模型文件
using CompiledModel compiled_model = core.compiled_model(model, "AUTO"); // 将模型加载到设备
using InferRequest infer_request = compiled_model.create_infer_request(); // 创建推理通道
using Tensor input_tensor = infer_request.get_tensor("images"); // 获取输入节点Tensor
infer_request.infer(); // 模型推理
using Tensor output_tensor = infer_request.get_tensor("output0"); // 获取输出节点Tensor
}
}
}
💻 应用案例(Application)
获取更多应用案例请参考:OpenVINO-CSharp-API-Samples
For more application cases, please refer to: OpenVINO-CSharp-API-Samples
🗂API 文档(API Documentation)
如果想了解更多信息,可以参阅:OpenVINO™ C# API API Documented
If you want to learn more information, you can refer to: OpenVINO™ C# API API Documented
🎖 贡献(Contribution)
如果您对OpenVINO™ 在C#使用感兴趣,有兴趣对开源社区做出自己的贡献,欢迎加入我们,一起开发OpenVINO™ C# API。
如果你对该项目有一些想法或改进思路,欢迎联系我们,指导下我们的工作。
If you are interested in using OpenVINO™ in C # and making your own contribution to the open source community, please join us to develop OpenVINO™ C# API together. If you have any ideas or improvement ideas for this project, please feel free to contact us and guide our work.
🕿联系方式(Contact)
以下是我的联系方式:
E-mail:[email protected]
CSDN博客:https://guojin.blog.csdn.net
GitHub:https://github.com/guojin-yan
Gitee:https://gitee.com/guojin-yan
开源项目OpenVINO CSharp API:https://github.com/guojin-yan/OpenVINO-CSharp-API
视频网站:https://space.bilibili.com/222626791
微信公众号:CSharp与边缘模型部署
📖 许可证书(License)
本项目的发布受Apache 2.0 license许可认证。
The release of this project is certified under the Apache 2.0 license.
<div align=center><img src="https://s2.loli.net/2024/01/29/VIPU1MSwjEh2QAY.png" width=800></div>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net472 is compatible. net48 is compatible. net481 was computed. |
-
.NETCoreApp 3.1
- OpenVINO.CSharp.API (>= 2024.1.0.1)
- SharpCompress (>= 0.37.2)
-
.NETFramework 4.7.2
- OpenVINO.CSharp.API (>= 2024.1.0.1)
- SharpCompress (>= 0.37.2)
-
.NETFramework 4.8
- OpenVINO.CSharp.API (>= 2024.1.0.1)
- SharpCompress (>= 0.37.2)
-
net5.0
- OpenVINO.CSharp.API (>= 2024.1.0.1)
- SharpCompress (>= 0.37.2)
-
net6.0
- OpenVINO.CSharp.API (>= 2024.1.0.1)
- SharpCompress (>= 0.37.2)
-
net8.0
- OpenVINO.CSharp.API (>= 2024.1.0.1)
- SharpCompress (>= 0.37.2)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on OpenVINO.CSharp.API.Extensions:
Package | Downloads |
---|---|
OpenVINO.CSharp.API.Extensions.OpenCvSharp
Based on the C # platform, call the OpenVINO suite to deploy a deep learning model. |
|
OpenVINO.CSharp.API.Extensions.EmguCV
Based on the C # platform, call the OpenVINO suite to deploy a deep learning model. |
|
OpenVINO.CSharp.API.Extensions.PaddleOCR
Deploy PaddleOCR model using OpenVINO C # API to achieve text image recognition. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on OpenVINO.CSharp.API.Extensions:
Repository | Stars |
---|---|
guojin-yan/YoloDeployCsharp
Deploying Yolov8-det, Yolov8-pose, Yolov8-cls, and Yolov8-seg models based on C # programming language.
|
This assembly is for OpenVINO CSharp API. The expansion of API mainly involves encapsulating the inference process of common models and the pre-processing and post-processing methods of data.