Creating an app and want to stop Posenet when its job is done
private sketch(p: any) {
p.setup = () => {
this.poseNet = ml5.poseNet(p.createCapture(p.VIDEO), {
outputStride: 8
});
this.poseNet.on('pose', (results) => {
//DO SOMETHING WITH results[0]
});
};
}
Already tried setting diverse vars to null
StopKI() {
// Terminate PoseNet when done
this.p5 = null;
this.poseNet = null;
console.log('KI stopped');
}