Labs-IntelligentAPIs icon indicating copy to clipboard operation
Labs-IntelligentAPIs copied to clipboard

Unknown model file format version with Yolo Model Object Detection

Open michael-hawker opened this issue 4 years ago • 3 comments

"The parameter is incorrect.\r\n\r\nFailed to load model with error: Unknown model file format version."

   at CommunityToolkit.Labs.Intelligent.ObjectDetection.YOLOObjectDetector.<InitModelAsync>d__9.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityToolkit.Labs.Intelligent.ObjectDetection.YOLOObjectDetector.<EvaluateFrame>d__10.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityToolkit.Labs.Intelligent.ObjectDetection.YOLOObjectDetector.<DetectObjects>d__8.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CommunityToolkit.Labs.Intelligent.ObjectDetection.YOLOObjectDetector.<DetectObjects>d__6.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IntelligentLabsTest.ResultsPage.<OnNavigatedTo>d__4.MoveNext() in H:\code\Labs-IntelligentAPIs\IntelligentAPIsTester\ResultsPage.xaml.cs:line 74
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_0(Object state)
   at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()

Happens for me in main and with NuGet package.

VS 16.9.8 Win 10 21H1 19043

michael-hawker avatar Aug 04 '21 17:08 michael-hawker

Happens on this line:

_session = new LearningModelSession(_model, device);
   at Windows.AI.MachineLearning.LearningModelSession..ctor(LearningModel model, LearningModelDevice deviceToRunOn)
   at CommunityToolkit.Labs.Intelligent.ObjectDetection.YOLOObjectDetector.<InitModelAsync>d__9.MoveNext() in H:\code\Labs-IntelligentAPIs\ObjectDetector\YOLOObjectDetector.cs:line 191

michael-hawker avatar Aug 04 '21 17:08 michael-hawker

This happens for me in their official sample as well:

image

michael-hawker avatar Aug 04 '21 18:08 michael-hawker

Linking to issue in the sample repo here #404.

michael-hawker avatar Aug 05 '21 07:08 michael-hawker