I cannot seem to diagnose any issue in my code yet after 9 epochs of training I get the error in the title.
Here is the code that stores values inside the posenet listener callback
if (poses.length > 0) {
pose = poses[0].pose;
skeleton = poses[0].skeleton;
let inputs = [];
if (isCapturing) {
for (let keypoint of pose.keypoints) {
let x = keypoint.position.x;
let y = keypoint.position.y;
inputs.push(x);
inputs.push(y);
}
if (targetSwitch == 1) { poses1.push(inputs); }
if (targetSwitch == 2) { poses2.push(inputs); }
}
}
}
and here is where i add the data to the neural net
if (key == 't') {
for (var i = 0; i < poses1.length; i++){
input = poses1[i];
output = poses2[i];
debugArIn.push(input);
debugArOut.push(output)
brain.addData(input, output);
};
brain.normalizeData();
//each pose is stored with 34 values (x and y values for each landmark)
brain.train({epochs:34, batchsize:68})
}
Trying to create a regression model in ml5.js that takes a 2d array of posenet landmark coordinates as inputs and another of the same type as outputs.