Preact - Next.js - Deno - SSR - SSG 💻
Open source 📂
Machine learning 🤖
Books 📖
Sport 🏃♂️
Nature 🌱
Focus on being useful. I contribute AMAP to the OSS community. Love learning by doing.
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...)
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.
Preact - Next.js - Deno - SSR - SSG 💻
Open source 📂
Machine learning 🤖
Books 📖
Sport 🏃♂️
Nature 🌱
Focus on being useful. I contribute AMAP to the OSS community. Love learning by doing.
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!