I am in the process of carrying out a small project to learn the alphabet in sign language (and learn p5.js and ml5.js). I got an already trained model that I want to import into my project. The model was in .h5 and I converted it with this command:
$ tensorflowjs_converter --input_format keras model/model.h5 modelJS/
When i load the model with load() i get this error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'load')
let classifier;
function loadModel(){ classifier.load('modelJS/model.json', predict); }
function predict(){ //classifier.classify({image:video},gotResults); }
function setup() {
createCanvas(640, 480); video = createCapture(VIDEO); video.hide();
background(0);
// Load Model
loadModel()
};
function draw(){ image(video, 0, 0, 640, 480); }