How to improve the accuracy and recall of exported ONNX model?

Mark Oueis 1 Reputation point
2022-08-24T20:48:23.87+00:00

We have a custom vision model that we are extremely happy with - built from the ground up using custom vision. Because we need to do detections every second, we decided to go on the edge and export the model to ONNX (otherwise on the cloud the cost is prohibitive). We switched our model to a "compact" domain and then exported it to ONNX and ran it from a c# console application on windows 10. We expected worse accuracy, but the results were quite terrible - significantly worse that they were when using the [a1] domain. It would miss many objects or find them with very low probability.

We then trained the compact model a little more to see if we can improve the recall. It seemed to help a little, but still nowhere near what it was. When we use the API against the compact domain (as opposed to export and running it from the c# model) we get better results (though still not as good). The worst is when we just run it from our c# app.

How can I improve the performance of this exported to ONNX model running from our c# app

  1. Are we doing something wrong on the inference side from the console app. What should we look for?
  2. Will more training help?
  3. Can we export a larger but more accurate model
  4. Could it be that this is as good as it gets because its an exported compact domain?
  5. Are there other options we haven't considered

I'm thinking if we should give us on custom vision export and train our own model with a different platform or if we can continue on custom vision and get the detection accuracy we need.

Thank you

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.
249 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.