Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf parsing failed. #24

Open
xiaobaixuejava opened this issue Sep 12, 2024 · 0 comments
Open

Protobuf parsing failed. #24

xiaobaixuejava opened this issue Sep 12, 2024 · 0 comments

Comments

@xiaobaixuejava
Copy link

at Microsoft.ML.OnnxRuntime.InferenceSession.Init(String modelPath, SessionOptions options, PrePackedWeightsContainer prepackedWeightsContainer)
at Microsoft.ML.OnnxRuntime.InferenceSession..ctor(String modelPath)
at YoloDotNet.Data.YoloCore.InitializeYolo(ModelType modelType)
at YoloDotNet.Data.ModuleFactory.InitializeYoloCore(YoloOptions options)
at YoloDotNet.Data.ModuleFactory.CreateModule(YoloOptions options)
at YoloDotNet.Yolo..ctor(YoloOptions options)

using var yolo = new Yolo(new YoloOptions()
{
OnnxModel = onnxPath, // Your Yolov8 or Yolov10 model in onnx format
ModelType = ModelType.ObjectDetection, // Model type
Cuda = false, // Use CPU or CUDA for GPU accelerated inference. Default = true
GpuId = 0, // Select Gpu by id. Default = 0
PrimeGpu = false, // Pre-allocate GPU before first. Default = false
});

Console.WriteLine(yolo.OnnxModel.ModelType);

使用测试代码出现上述问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant