-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix imageClassifier webgpu bug + add teachable machine image example #141
Conversation
This looks great! Picking up from #128, since Teachable Machine flips the webcam image during training let's include the flipped property in the example. Would you like to add this in before merging @ziyuan-linn? @sharellb you can use this as a model for the other examples if you want to work on those! |
No functional changes
Thanks Peter! This is awesome! |
@shiffman @sharellb I included the |
Ah, I see! If the p5.js |
The original image is passed to the model. |
@shiffman I did some quick testing and I think teachable machine actually trains on the original unmirrored webcam footage as well. I trained a model with mirror camera enabled on teachable machine. The same model loaded in to ml5 correctly classifies the underlying unmirrored video. We probably don't have to change anything. |
Oh, fantastic, thank you the thorough testing! Merging! |
This PR changes
dataSync
todata
in theclassifyInternal
method in order to supportwebgpu
backend.setBackend("webgl")
is no longer needed. The end user API is not affected by this change.This PR also adds a teachable machine image example as requested by @QuinnHe in ml5js/ml5-website-v02-docsify/issues/96. The only things I changed are removing
setBackend("webgl")
line and changing the color of the text for better visibility. This example should be live on the web editor once we merge this PR and run the p5 upload script.