YOLOv4ObjectDetection is not working on windows 10
I'm submitting a Bug Report
I searched for similar issues and did not find one.
Current behavior
- \Samples\Tutorial Samples\YOLOv4ObjectDetection doesn't work.
-
new LearningModelSessionis throwing exception saying:
The parameter is incorrect.
Failed to load model with error: Unknown model file format version.
Expected behavior
Should just work. And if it fails it should tell me how to fix it.
Minimal reproduction of the problem with instructions
Build and run the sample.
Environment
ONNX Runtime installed from (source or binary): C:\Windows\System32\Windows.AI.MachineLearning.dll ONNX Runtime version: 1.0.2007.1310 Windows Build Number: Windows 10 version 21H1 build 19043.1110 App min and target version: 10.0.18362.0 and 10.0.19041.0 OS Version (Server, IoT Core, Desktop, etc): Desktop Graphics Driver version: NVidia GeForce GTX 1080, Driver Version 471.41
DxDiag: DxDiag.txt
WinMLTools specific: - Source training framework: (e.g. CoreML, Scikit-learn, …) - WinMLTools version
Visual Studio
- [x] 2019 (version: 16.10.4)
@lovettchris - thanks for reporting. It looks like the problem is that the operator set from the yolo model is not supported by the version of Windows on your machine. The yolo model requires operator set version 11, but your OS build only supports version 9 (version support table is here: https://docs.microsoft.com/en-us/windows/ai/windows-ml/onnx-versions). You can upgrade to an insider flight of Windows to unblock yourself while we work on a fix, since the tutorial should probably not require you to be on an insider flight of Windows.
Also, we are aware that the error message you're seeing isn't exactly helpful. Cleaning that up is on our backlog.
I see, well I just got upgraded to windows 11 and it works now... but yeah, would be nice if it also worked on windows 10.

great, glad it's working for you. We're working on making this not require windows 11.
In the meantime, looks like your theming changes work well!
Yeah, we've hit this as well. It'd be great if the models could target op set 7 for working on 1809+.
great, glad it's working for you. We're working on making this not require windows 11.
In the meantime, looks like your theming changes work well!
I'm quite interested in this! Any ETA when this will work? Thanks!
This issue should now be resolved as the sample has been changed to use the Microsoft.AI.MachineLearning NuGet package.