You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
使用测试代码出现上述问题
The text was updated successfully, but these errors were encountered:
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);
使用测试代码出现上述问题
The text was updated successfully, but these errors were encountered: