TensorFlow.js is a new version of the popular open-source library which brings deep learning to JavaScript. Developers can now define, train, and run machine learning models using the high-level library API.

Pre-trained models mean developers can now easily perform complex tasks like visual recognition, generating music or detecting human poses with just a few lines of JavaScript. Having started as a front-end library for web browsers, recent updates added experimental support for Node.js.

This allows TensorFlow.js to be used in backend JavaScript applications without having to use Python. Reading about the library, I wanted to test it out with a simple task…

🧐 Use TensorFlow.js to perform visual recognition on images using JavaScript from Node.js Unfortunately, most of the documentation and example code provided uses the library in a browser. Project utilities provided to simplify loading and using pre-trained models have not yet been extended with Node.js support.

Getting this working did end up with me spending a lot of time reading the Typescript source files for the library. 👎 However, after a few days’ hacking, I managed to get this completed! Read more from dev.to…

thumbnail courtesy of .dev.to