The following notebook successfully loads an exported model from Google’s Teachable Machine:
However, attempting to implement the exported models pattern in Observable throws a run-time error (T.fromPixels is not a function).
Recommendation is to use tf.browser.fromPixels , but the code snippet generated by the trained model export is utilizing the image package with the built-in methods to consume the webcam’s output.
Any suggestions on debugging this to make the code run in Observable is appreciated. The goal is to have a notebook anyone can fork and simply replace with their pre-trained image detection model generated by the Teachable Machine.
Notebook: Using A Trained Teachable Machine Model in Observable / Mario Delgado | Observable
P.S. The pattern in the notebook How to build a Teachable Machine with TensorFlow.js is helpful, but not directly comparable to the pattern of loading a pre-trained model with its associated weights.