As machine learning continues to accelerate, more and more languages are joining the bandwagon. JavaScript which has been the leader of the web ecosystem for a while now has slowly gained pace in machine learning as well.

An encouraging number of JavaScript libraries, specifically for machine learning have released over the past year. This would certainly boost AI-powered web browsers. Additionally, JavaScript for machine learning has the advantage of quick and easy deployment of models in mobile applications by leveraging web views.

At the heart of TensorFlow, we have a Web GL accelerated TensorFlow.js library that lets you train and run models directly in the browser or with Node.js. The best thing is, you don’t need to be a machine learning expert in order to deploy basic models as the library already provides a bunch of pre-trained models for classification, segmentation, and more.

Let’s look at a few awesome libraries build on top of TensorFlow.js to inspire your next machine learning project.


1. Face And Emotion Recognition

Face detection has been one of the classic use cases in Open-CV and naturally, it became the common use case in machine learning as well.

face-api.js is a JavaScript face recognition library implemented on top of TensorFlow.js. It lets you detect and recognize faces and landmarks while also determining emotions and gender in images.

The library completely abstracts away the underlying implementation to provide you with an easy to use high level API. All you need to do is invoke the methods for relevant neural net model with an option to also call the ready-drawing functions for overlaying the feature points on the canvas.

Image for post

Here’s the basic code for setting up face detection with landmark and expression detection:

const detection = await faceapi.detectAllFaces(image)                                     .withFaceLandmarks()                                    .withFaceExpressions();

2. Image Style Transfer

Style transfer today, is the most popular deep learning tasks. From photo editing apps to customizing themes in your apps, its possibilities are endless.

At a very high level, neural style transfer involves imparting the style from one image into another. Generally, you can use famous paintings or abstract arts to bring a new look to your input image.

#javascript #programming #machine-learning #artificial-intelligence #data-science

6 Amazing TensorFlow.js Projects to Kickstart Machine Learning on Web
1.35 GEEK