I am attempting to run a pose classification model that I trained on a video file, but I can't seem to figure out how to get it working with anything other than the documentation they provide for running inference on webcam input. I am trying to run the model using their provided javascript example code. I added an html video element and specified the height and width parameters, but I can't figure out how to get the predictions working in async function predict(). I commented out the webcam setup provided in the original code, and changed all webcam.canvas objects to video.canvas. I'm pretty new to javascript but the model only exports as tensorflow.js so that's what I have to work with. Any tips would be appreciated!
This is the error that is thrown:
teachablemachine-pose.min.js:58 Uncaught (in promise) TypeError: Cannot read property 'height' of undefined
at y (teachablemachine-pose.min.js:58)
at Object.e.padAndResizeTo (teachablemachine-pose.min.js:58)
at t. (teachablemachine-pose.min.js:51)
at teachablemachine-pose.min.js:34
at Object.next (teachablemachine-pose.min.js:34)
at teachablemachine-pose.min.js:34
at new Promise ()
at r (teachablemachine-pose.min.js:34)
at t.estimatePoseOutputs (teachablemachine-pose.min.js:51)
at t. (teachablemachine-pose.min.js:51)
I am attempting to run a pose classification model that I trained on a video file, but I can't seem to figure out how to get it working with anything other than the documentation they provide for running inference on webcam input. I am trying to run the model using their provided javascript example code. I added an html video element and specified the height and width parameters, but I can't figure out how to get the predictions working in async function predict(). I commented out the webcam setup provided in the original code, and changed all webcam.canvas objects to video.canvas. I'm pretty new to javascript but the model only exports as tensorflow.js so that's what I have to work with. Any tips would be appreciated!
This is the error that is thrown: teachablemachine-pose.min.js:58 Uncaught (in promise) TypeError: Cannot read property 'height' of undefined at y (teachablemachine-pose.min.js:58) at Object.e.padAndResizeTo (teachablemachine-pose.min.js:58) at t. (teachablemachine-pose.min.js:51)
at teachablemachine-pose.min.js:34
at Object.next (teachablemachine-pose.min.js:34)
at teachablemachine-pose.min.js:34
at new Promise ()
at r (teachablemachine-pose.min.js:34)
at t.estimatePoseOutputs (teachablemachine-pose.min.js:51)
at t. (teachablemachine-pose.min.js:51)