Issue Type
Broken API/Method
ml5.js Version
1.2.0 and 1.2.1
Development Environment
p5.js Web Editor
Browser & Operating System
Chrome 131.0.6778.108 on Windows 11
Issue Description

It is expected that the BodySegmentation starts outputting flipped masks without any error. However no masks predicted and the error in the above screenshot is produced.
Minimal Reproducible Example
// This is the same code from ml5 example sketch
// I just added flipped = true
let bodySegmentation;
let video;
let segmentation;
let options = {
maskType: "person",
flipped: true
};
function preload() {
bodySegmentation = ml5.bodySegmentation("SelfieSegmentation", options);
}
function setup() {
createCanvas(640, 480);
// Create the video
video = createCapture(VIDEO);
video.size(640, 480);
video.hide();
bodySegmentation.detectStart(video, gotResults);
}
function draw() {
background(0, 255, 0);
if (segmentation) {
video.mask(segmentation.mask);
image(video, 0, 0);
}
}
// callback function for body segmentation
function gotResults(result) {
segmentation = result;
}
Thank you @demizhou8 for surfacing this bug!
Code of Conduct
Issue Type
Broken API/Method
ml5.js Version
1.2.0 and 1.2.1
Development Environment
p5.js Web Editor
Browser & Operating System
Chrome 131.0.6778.108 on Windows 11
Issue Description
It is expected that the BodySegmentation starts outputting flipped masks without any error. However no masks predicted and the error in the above screenshot is produced.
Minimal Reproducible Example
Thank you @demizhou8 for surfacing this bug!
Code of Conduct