-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use custom Onnx model in place of Onnx model found on Object Detection sample #5484
Comments
Hi, Can you share a .zip containing your Visual Studio project (code + onnx model + dataset)?
How did you evaluate the accuracy of the customvision model before evaluating it in ML.NET? did you use the same test dataset for doing the evaluation outside and inside ML.NET? |
@antoniovs1029 model address ==>> http://club.ses.co.ir/iter7ocrwin691pic.zip i used this sample code . in cloud this 10 images detected good |
Hi, so if I understand correctly, you're simply replacing the onnx model found on the sample with your own onnx model without making changes to the code in the sample, is this correct? If so, please notice that you would actually need to modify the sample to make it work for your own Onnx model, as each onnx model can have a different input/output. Looking into your onnx model, I see that it expects the same input as the onnx model on the sample, but the output of your onnx model is different. For instance, as explained here in the sample, the onnx model on the sample detects 20 different classes of objects, and it encodes the output in a 125x13x13 output array. The classes that the sample works with were hard coded here: In your case, you'd need to modify the file above to match the labels you expect from your model. Your .zip containing your model, has also a
I believe this means your model was trained on 10 different classes, but there are no names for these classes, only digits (which I believe is what you want the model to detect, anyway). So, for starters, you'd need to update the file I pointed above, to have these 10 labels. If that doesn't work, then there's another situation to consider: the onnx model from the sample outputs a Whereas your model has the following NonexNone2x13x13, which, ignoring the batch dimension, I think would be a Nonex13x13 array where the None means "variable length". Because of this, it might be the case that your model doesn't encode its predictions in the same way as the model of the sample, and so you'll need to figure out how to further modify the sample to fit your scenario. |
@antoniovs1029: At runtime is there enough information to verify that the inputs/outputs exist and are the right shapes? |
@antoniovs1029 |
see this is my result picture https://pasteboard.co/JAkV70c.png what is problem ?? |
please help i need this project . |
I am having similar issues with an exported object detection from custom vision, definitely not just you @masgh021, I think this is happening to anyone who is exporting a model and trying to use it in this way. I've been through editing anchors and making any obviously needed changes, but my accuracy is also reduced. This issue needs to be elevated, @antoniovs1029 please work with us to find a solution, my email is benjk117@gmail.com if anyone would like to reach out. |
I am able to see in the debugger that my model's output is a float array of size 30 x 13 x 13 = 5070 rather than the 125 x 13 x 13 = 21125 of the sample. What exactly to do about this.. I have no idea. |
Hi all, |
@cvixxt can you share a sample repro project so I can take a look? With the onnx model/code/data so we can get an easier repro. And also what results were you getting online so we know where the discrepancy is. |
Hi @michaelgsharp |
I have a digit detection model in custom vision and it is detecting digit Very good at cloud https://www.customvision.ai/.
After i export it local (onnx) and i checked with ml.net
our accuracy decrease and it does not recognize object . in most images .
note : my objects are small , character size like ocr,
please help me.
The text was updated successfully, but these errors were encountered: