Comments (4)
π Hello @arturcortellijunior, thank you for raising an issue about Ultralytics HUB π! Please visit our HUB Docs to learn more:
- Quickstart. Start training and deploying YOLO models with HUB in seconds.
- Datasets: Preparing and Uploading. Learn how to prepare and upload your datasets to HUB in YOLO format.
- Projects: Creating and Managing. Group your models into projects for improved organization.
- Models: Training and Exporting. Train YOLOv5 and YOLOv8 models on your custom datasets and export them to various formats for deployment.
- Integrations. Explore different integration options for your trained models, such as TensorFlow, ONNX, OpenVINO, CoreML, and PaddlePaddle.
- Ultralytics HUB App. Learn about the Ultralytics App for iOS and Android, which allows you to run models directly on your mobile device.
- Inference API. Understand how to use the Inference API for running your trained models in the cloud to generate predictions.
If this is a π Bug Report, please provide screenshots and steps to reproduce your problem to help us get started working on a fix.
If this is a β Question, please provide as much information as possible, including dataset, model, environment details etc. so that we might provide the most helpful response.
We try to respond to all issues as promptly as possible. Thank you for your patience!
from hub.
Hello! It's great to hear that you've successfully trained and used your model with ONNX and C#. For integrating OpenVino with C#, you might need to adjust your approach since direct support can be limited.
For using OpenVino in C#, you generally need to use the OpenVino Runtime which is primarily designed for C++ and Python. However, you can create a C++ DLL that wraps the OpenVino functionality and then use P/Invoke in C# to call the functions from this DLL.
Hereβs a very basic outline of the steps:
- Create a C++ DLL that loads the OpenVino model and performs inference.
- Use P/Invoke in C# to interact with the DLL.
C++ DLL example (simplified):
extern "C" __declspec(dllexport) int LoadModel(const char* modelPath) {
// Load model with OpenVino here
return 0; // Return an error code or success
}
extern "C" __declspec(dllexport) int PerformInference(const char* imagePath, char* outputData, int outputLength) {
// Perform inference here
return 0; // Return an error code or success
}
C# P/Invoke setup:
class OpenVinoInterop {
[DllImport("YourModelDLL.dll", CharSet = CharSet.Ansi)]
public static extern int LoadModel(string modelPath);
[DllImport("YourModelDLL.dll", CharSet = CharSet.Ansi)]
public static extern int PerformInference(string imagePath, StringBuilder outputData, int outputLength);
}
You would need to handle data marshaling between C# and C++ carefully, especially for image data and inference results.
This approach requires a good understanding of both C++ and C# interop features but can be very powerful. If you're not familiar with C++ or DLL creation, it might require some additional learning or collaboration with someone who has these skills.
Hope this helps you get started with using OpenVino in your C# environment! π
from hub.
Hi Paula, thanks for getting back to us.
Do you happen to have the Wrapper for this?
We can't create it in C++ here.
Hello! It's great to hear that you've successfully trained and used your model with ONNX and C#. For integrating OpenVino with C#, you might need to adjust your approach since direct support can be limited.
For using OpenVino in C#, you generally need to use the OpenVino Runtime which is primarily designed for C++ and Python. However, you can create a C++ DLL that wraps the OpenVino functionality and then use P/Invoke in C# to call the functions from this DLL.
Hereβs a very basic outline of the steps:
- Create a C++ DLL that loads the OpenVino model and performs inference.
- Use P/Invoke in C# to interact with the DLL.
C++ DLL example (simplified):
extern "C" __declspec(dllexport) int LoadModel(const char* modelPath) { // Load model with OpenVino here return 0; // Return an error code or success } extern "C" __declspec(dllexport) int PerformInference(const char* imagePath, char* outputData, int outputLength) { // Perform inference here return 0; // Return an error code or success }C# P/Invoke setup:
class OpenVinoInterop { [DllImport("YourModelDLL.dll", CharSet = CharSet.Ansi)] public static extern int LoadModel(string modelPath); [DllImport("YourModelDLL.dll", CharSet = CharSet.Ansi)] public static extern int PerformInference(string imagePath, StringBuilder outputData, int outputLength); }You would need to handle data marshaling between C# and C++ carefully, especially for image data and inference results.
This approach requires a good understanding of both C++ and C# interop features but can be very powerful. If you're not familiar with C++ or DLL creation, it might require some additional learning or collaboration with someone who has these skills.
Hope this helps you get started with using OpenVino in your C# environment! π
from hub.
@arturcortellijunior hello!
Unfortunately, we don't have a pre-made C++ wrapper available for OpenVino that you can use directly. Creating such a wrapper requires specific expertise in both C++ and the OpenVino toolkit.
If creating a C++ DLL isn't feasible in your current setup, you might consider looking for external C++ development resources or consulting services that could assist in this task. Another alternative could be to explore if any community projects or third-party libraries offer a similar functionality that could be integrated into your project.
Sorry I couldn't provide a direct solution this time! If you have any more questions or need further assistance, feel free to ask. π
from hub.
Related Issues (20)
- YOLOv10 ? HOT 1
- Ultralytics HUB API Issue HOT 2
- Ultralytics Pro member doesn't work dataset HOT 2
- instances.keypoints: index is out of bounds HOT 2
- Labeling tool in the process HOT 4
- This account is currently being deleted. HOT 4
- Model parallelization for inference on large images HOT 2
- 'yolov8n-pose.yaml' HOT 19
- det HOT 2
- No response from the server. HOT 14
- canΒ΄t remove Roboflow linked workspaces HOT 9
- How to download training logs to view in tensorflow? HOT 1
- Team member invitation is not sending the email invitation HOT 1
- Resolution Option, Does it need to be square 1920*1920? Can I do 1920*1080? HOT 2
- Integrating Yolo V8 For Football Analysis HOT 5
- unable to process the dataset HOT 3
- APP11 HOT 3
- my model is optimizing the weights and giving me the option of preview and deployment HOT 38
- Merging datasets HOT 4
- Ultralitics HUB can retrieve Roboflow dataset to train HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hub.