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

Validation samples #1

Open
DeveloperNo579212 opened this issue Jan 28, 2022 · 3 comments
Open

Validation samples #1

DeveloperNo579212 opened this issue Jan 28, 2022 · 3 comments

Comments

@DeveloperNo579212
Copy link

Found this example and tried a model exported from teachablemachine to SavedModel and then tf2onnx.
With 10 images of two class each (left hand 10 pics, right hand 10 pics) I get 100% hitrate on website prior to export
using the training sample as prediction input.
Using tf2onnx 1.9.3 when converting to onnx I get a warning (Runtime warning) but it looks good else. (Tried 1.10 latest also)
Using the slight modified source code I do not get 100% hitrate with same input for prediction, about 50/60 % and unreliable.

No clue on how to validate onnx model.

@eNeRGy164
Copy link
Owner

I'm no expert in ONNX, but one thing I ran into in the past was different tools use different ways to handle RGB vs BGR.

If you swap the Blue and Red channels, does the score improve?
In my code I have to do this:

CvInvoke.CvtColor(screen, screen, ColorConversion.Bgr2Rgb);

@DeveloperNo579212
Copy link
Author

DeveloperNo579212 commented Jan 31, 2022

Thanks verified my onnx is ok, I thought the alpha channel might be needed but it is only 3 dimensions in the onnx.

@MrBean2016
Copy link

There are also different options for resizing found in resizing: Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants