This project is based on Posenet model by Tensorflow.js and bootstrapped with Create React App. It's an easy revision based on the original sample code by scaling up the dots on detection key points, and render them on canvas frame by frame.
Though I haven't inspect closely at the memory usage of this app, I'm sure that this program is taking up huge amount of memory space. I barely have any knowledge about memory management of computer, so I couldn't figure out the reason. But I do know that there's two possible causes. First, I notice that there's
dispose() function called in example code, does that mean I have to clean up the
tensorflow instance at certain points?
Also, because the
canvas element in
HTML is actually frame-by-frame copies, which is repeatedly executed by
requestAnimationFrame(), from the
video element, it's very likely that something's wrong in here.