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

Model generated by Object Detection does not work with Windows.AI.MachineLearning libraries #5402

Closed
arafattehsin opened this issue Sep 19, 2020 · 4 comments
Labels
ModelBuilder Bugs related model builder

Comments

@arafattehsin
Copy link

Hi Team! Is this ML.NET's issue or WinML team's problem? Happy to close it here and open it there if it's the case.

System information

  • *Windows 10 / 19041.329:
  • UWP:

Issue

  • I tried to use the ONNX model created by ML.NET Object Detection (Azure ML)
  • I gave me an error
  • It must have worked fine

Source code / logs

Here's the issue I get; I have tried using last 3 builds and it works well with other ONNX models.

image

@antoniovs1029
Copy link
Member

Hi, @arafattehsin . Can you please share the full stack trace and your model? Thanks

@arafattehsin
Copy link
Author

Hi @antoniovs1029

Sure! This is what I have got.

image

Stack Trace:

at Windows.AI.MachineLearning.LearningModelSession..ctor(LearningModel model) at CodeProject01.ObjectDetection.<Init>d__8.MoveNext() in C:\Users\ArafatTehsin\source\repos\Custom Vision\Demos\CodeProject01\ObjectDetection.cs:line 90 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.GetResult() at CodeMashMarvelUwp01.MainPage.<InitModel>d__13.MoveNext() in C:\Users\ArafatTehsin\source\repos\CustomVision\Demos\CodeProject01\MainPage.xaml.cs:line 61

Model Dropbox Link

@antoniovs1029
Copy link
Member

Hi, @arafattehsin .

I don't think this is a problem on ML.NET, so as you pointed out, this might be a problem on WinML. So please, reach out to them and share with them the info you've shared here. So I'll close this issue.

By the way, I don't think your scenario is using ML.NET at all. I think that when you say "I tried to use the ONNX model created by ML.NET Object Detection (Azure ML)" you actually meant that "I tried to use the ONNX model created by ModelBuilder ...". Please note that ModelBuilder is a VisualStudio plug that is used to create machine learning models. ModelBuilder uses ML.NET behind the scenes for most scenarios and creates ML.NET models for those scenarios, but for the Object Detection scenario it actually uses Azure ML which in turns trains a pytorch model using PyTorch, which is then exported to Onnx. So In your scenario ML.NET is never involved.

For your case, I'd think the issue is on WinML (since the stack trace points to the Windows.AI.MachineLearning namespace), but if the problem was on ModelBuilder, then the correct place to post the issue would be ModelBuilder's repo:
https://github.com/dotnet/machinelearning-modelbuilder/issues

Thanks,
Antonio

@antoniovs1029 antoniovs1029 added the ModelBuilder Bugs related model builder label Sep 21, 2020
@arafattehsin
Copy link
Author

Cheers @antoniovs1029 - I will open up this issue with them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ModelBuilder Bugs related model builder
Projects
None yet
Development

No branches or pull requests

2 participants