Now, with TensorFlow.js developers can easily run a machine learning model using JavaScript. With  Pre-trained models, you can complete complex tasks easily, it not requires the knowledge to build a model from scratch.

For the first time, TensorFlow.js working as a front-end library for web browsers. But now, tfjs (aka TensorFlow.js) support to be used in backend JavaScript — Nodejs. This means you can create a web service that can work with a TensorFlow model by Nodejs instead of Python.

Follow  this example code, we are going to build a web service that includes an API. The API will return classification for an image that a user uploads to the server.

This project base on this article, requires your knowledge about Typescript, Nodejs, Express.

Simple web service with express

The target of this part is creating an api that can handling file uploading to the expressjs server.

Checkout codebase:

$ git clone ts-image-classification

// Open project with VSCode
$ code ts-image-classification

#typescript #classification #expressjs

Image Classification API with NodeJS, TensorflowJS, and MobileNet Model
1.40 GEEK