Good article! 😊 Nevertheless, in the tfjs documentation I see that there is the method tf.fromPixels that creates a tf.Tensor from an image. Maybe is possible to replace it? Instead of jpeg-js library?
I'm not familiar with tensorflow.js, but I think that for matrix operations like this is performing better (with GPU) than using two nested fors. (Not sure...)
Thank you!! BTW; Very good article!
Hello Aral, tf.fromPixels can only be used in the browser I'm afraid. It extract pixels from DOM elements like video, image or canvas tags, rather than native buffers.
Thank you for that clarification! I would like to try tfjs in node.js!
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.