Models Covered:
demo code for all models mentioned in lecture: week3-pose
ml5 website > getting started. quick start link to add to html
then go to reference page to see the things you can do with it, also has examples
//always get video like this. but plain video element and dont want so hide
//want diff one, one we draw as img on canvas
let video;
function setup() {
video = createCapture(VIDEO)
video.hide()
createCanvas(640, 480);
}
function draw() {
image(video, 0, 0, width, height)
}
function setup() {
myBodyPix = ml5.bodyPix(video, modelLoaded)
function modelLoaded(){
console.log('model is ready', myBodyPix)
}