Inaccurate/Different Results in using Exported ONNX Object Detector vs Portal

Ben Knutson 6 Reputation points
2020-12-31T10:11:45.82+00:00

Hi, my name is Ben Knutson, thanks so much for your time. I'm having a problem using an exported ONNX object detector in an ML.NET C# console application. Basically I've taken some sample code (provided by Microsoft) for a C# console application and I've modified the anchors and labels/classes, everything is running but the results I'm getting don't match what I'm seeing in the portal.. it's typically performing worse, but still working enough for me to know it's nothing obvious.

I think there's something happening pre/post-processing in Azure Custom Vision portal that has not ever been made public before. Either that or the exported ONNX models are just incorrect.. I'm wondering if someone can get in touch with me to resolve this issue?

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
221 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Arif Budimartoyo 6 Reputation points
    2022-08-15T00:18:01.61+00:00

    @Ben Knutson You might need to double check the specifications on the exported model from Custom Vision at Azure Cognitive Service, and apply the same on the .NET ML. The standard ONNX model export from Azure Custom Vision is cropped with 224 x 224 size and converted to BGR as specified in the documentations below,

    https://learn.microsoft.com/en-us/azure/machine-learning/how-to-inference-onnx-automl-image-models?tabs=multi-class#tabpanel_4_multi-class

    https://learn.microsoft.com/en-us/samples/azure-samples/cognitive-services-onnx-customvision-sample/cognitive-services-onnx-customvision-sample/

    I hope this will help.

    Arif

    1 person found this answer helpful.
    0 comments No comments