techwingslab / yolov5-net

YOLOv5 object detection with C#, ML.NET, ONNX
MIT License
351 stars 104 forks source link

Custom Model error? #76

Closed Desync3 closed 1 year ago

Desync3 commented 1 year ago

I get this error when loading my custom onnx model image I have no idea what it means. I dont even have a D:\a\ directory.

Microsoft.ML.OnnxRuntime.OnnxRuntimeException: '[ErrorCode:InvalidArgument] Failed to load model with error: D:\a_work\1\s\onnxruntime\core/graph/model_load_utils.h:57 onnxruntime::model_load_utils::ValidateOpsetForDomain ONNX Runtime only guarantees support for models stamped with official released onnx opset versions. Opset 17 is under development and support for this is limited. The operator schemas and or other functionality may change before next ONNX release and in this case ONNX Runtime will not guarantee backward compatibility. Current official support for domain ai.onnx is till opset 15. '

Desync3 commented 1 year ago

Fixed it, I just had to go to nuget manager and update onnx runtime to latest