23 Javascript Libraries for Machine Learning, Deep Learning, NLP and Computer Vision – You Did Not Know Exist

Javascript Libraries for Machine Learning, Deep Learning, NLP and Computer Vision - You Did Not Know Exist


When it comes to machine learning, you will often hear people discussing Python or R as their choice of programming language. But you will be surprised to know that we now have many Javascript libraries for machine learning that will make Javascript developers quite happy. And this is rightly so, after all, Javascript is the most popular language of modern times and you will hardly find any web applications that do not use Javascript in any form.

In this article, we will list down many interesting Javascript libraries for machine learning, data science, deep learning, NLP, and Computer Vision. It is most likely you may not have heard about all of them

Javascript Libraries for Machine Learning and Data Science


Javascript Library for Machine Learning


ML.js is a comprehensive Javascript library for machine learning with most of the APIs you will ever need to create and train machine learning models in your browser. You will find APIs for all major algorithms for supervised and unsupervised learning including neural networks. Additionally, it also provides APIs for many mathematical and statistical operations essential for machine learning.

With over 2K stars and visible activities in the Github repository, this is a great machine learning javascript library to explore.

GitHub Repository


Javascript Library for Machine Learning

Danfo.js is a javascript library that is heavily inspired by Python’s Pandas library. It offers a high-performance data structure that is quite intuitive and easy to use. It is built on top of tensorflow.js and hence supports tensor operations out of the box. This library can be quite useful to manipulate data for your machine learning or data science work in javascript.

Its GitHub repository has 1.3k stars and is undergoing active development.

GitHub Repository


Javascript Library for Machine Learning

Machinelearn.js is a javascript library for machine learning that targets simplicity for people who are not experts. It provides APIs for various machine learning algorithms that can be run on the web browser. Machinelearn.js offers ML algorithm APIs for SVM, Linear Models, Ensemble models, Decision Trees, clustering to name a few along with utilities for feature extraction, preprocessing, and model selection.

Besides all this, it also provides datasets like Boston, Heart Disease, Iris, etc. And it also provides GPU acceleration by binding through native C++. It too is a great-looking machine learning javascript library and by the admission of its makers, it is inspired by Python’s Scikit Learn library and ML.js library. However, its GitHub repository suggests it has not undergone active development for quite some time now.

GitHub Repository


Javascript Library for Machine Learning

Limdu.js is a machine learning javascript library for node.js that also supports multi-label classification, online learning, and real-time classification. Apart from this it also offers capabilities for feature engineering, serialization, cross-validation. Some of the supported algorithms include neural networks, Bayesian, SVM, Decision Tree, etc.

Since it supports real-time classification, it can also be used in chatbots for natural language understanding. With over 1K stars its Github repository is still active and surely worth checking.

GitHub Repository

Javascript Libraries for Deep Learning


Javascript Library for Deep Learning

Tensorflow.js is the most versatile javascript library for Deep Learning out there for creating and training neural network models in node.js or browser with hardware acceleration. You can also use pre-trained models for inferencing or retrain the existing models using transfer learning. Moreover, you can convert any existing model of Tensorflow to run it with the Tensorflow.js library.

It offers the following interesting pre-trained models –

  • Image Classification
  • Object Detection
  • Body Segmentation
  • Pose Estimation
  • Text Toxicity Detection
  • Universal Sentence Encoder
  • Speech Command Recognition
  • KNN Classifier
  • Simple Face Detection
  • Semantic Segmentation
  • Face Landmark Detection
  • Hand Pose Detection
  • Natural Language Question Answering

It is an open-source project on GitHub with 14.8K stars and is under continuous development and maintenance.

GitHub Repository


Javascript Library for Deep Learning - Brain.js

Brain.js is an open-source javascript library for neural networks with support for GPU acceleration. It exposes various APIs to help you create and train neural networks by abstracting you from underlying complexities. But you do not have the flexibility to experiment with your own architectures apart from what Brain.js offers you. At the time of writing this, it supports the following neural network types and their variations out-of-box –

  • Feedforward Neural Network (with and without GPU)
  • Recurrent Neural Network
  • Long Short Term Memory

Interestingly, its original creator Harthur had abandoned the GitHub project a few years back in spite of gaining initial popularity. This project now continues in a separate Github repository with more than 11K stars and is actively maintained by a large community.

GitHub Repository


Javascript Library for Deep Learning

WebDNN is a framework that lets you execute Deep Learning models using javascript API in the browser. It can execute pre-trained models created in the following languages –

  • Tensorflow
  • Keras
  • PyTorch
  • Chainer
  • Caffe

It works by compressing the model for faster execution in the browser. Its GitHub repository has 1.8K and the last active release happened in January 2020.

GitHub Repository



CoonvNetJS is an open-source Javascript library for Deep Learning that lets you create and train neural network models in your browser. It has the support for the following –

  • Regular Neural Network Models
  • Convolutional Neural Network
  • Deep Q Learning (Reinforcement Learning)

The demos hosted in the repository are quite cool but in spite of more than 10K stars its GitHub is no longer maintained by its creator Karpathy. And unfortunately, there is no community support either resulting in no updates for many years now.

GitHub Repository


Synaptic is a Deep Learning Javascript Library for node.js that claims to provide you flexibility for creating architecture-free neural networks of 1st and 2nd order. It does however provide below built-in neural network models –

  • Multilayer Perceptron
  • Multilayer LSTMS
  • Liquid State Machines
  • Hopfield Networks

It also provides a trainer module that is capable of training any given neural network architecture.

The creator of this library is Juan Cazala and its GitHub repository has 6.5K stars but it has not seen much activity in the last couple of years.

GitHub Repository


Javascript Library for Deep Learning

ML5.js is an open-source Javascript library for machine learning built on top of Tensorflow.js with support for GPU acceleration. This project is actually funded by Google Education Grant.

Since it is a high-level abstraction library ML5.js takes care of all the heavy lifting of memory management and GPU acceleration behind the scene and you need not do anything.

It comes with many pre-trained models for detecting human poses, generating text, styling an image with another, composing music, pitch detection, and common English language word relationships, etc

Apart from this, using ML5.js you can also create and train your own neural network model in the browser and it also extends support for Transfer Learning. And to add more variety to its offering it also supports algorithms for KMeans Clustering and KNN-Classification.

This high-level library is perfect for those people who are afraid to get entangled in the low-level complexities of Tensorflow.js but you should be aware that it does not support node.js at the moment.

GitHub Repository


Javascript Library for Machine Learning and Deep Learning

Magneta.js is a Javascript library built with Tensorflow.js that inferences pre-trained models in the browser for creative art purposes like music, sketches, and images. It also supports GPU acceleration for inferencing.

This library only lets you inference pre-trained models and you will not be able to train your own models.

GitHub Repository


Mind is a simple javascript library for creating neural networks in both node.js and browser. It offers customization for creating your own neural network architecture and you can download the model a.ka Mind or upload the earlier trained ones for reusing it as pre-trained models for inference.

The library was created by Steven Miller and the GitHub repository has got over 1.4K stars but unfortunately has not seen activity in development in the last four years.

Github Repository


Javascript Machine Learning Library

Neataptic.js is a javascript library that focuses on Neuro-Evolution which is a branch of artificial intelligence that generates neural network architectures using evolutionary algorithms. It can be used for both browser and node.js.

Although you can create and train your own neural network from scratch, Neataptic comes with the following 6 pre-configured networks –

  • GRU
  • Hopfield
  • LSTM
  • NARX
  • Perceptron
  • Random

Its GitHub repository has 1K stars, however, it is no longer maintained by its author Thomas Wagenaar.

GitHub Repository


Javascript Library for Deep Learning

MXnetJS is the javascript version of the apache MXNet framework for deep learning. It lets you inference state of art deep learning models and has support for both browser and node.js. MXNetJs can use any deep learning model trained with MXNet framework.

Its GitHub repository has 400+ stars but it has not seen any activity in the last 3-4 years.

GitHub Repository

Javascript Libraries for Natural Language Processing (NLP)



Javascript Library for Natural Language Processing

NLP.js is a full-fledged natural language processing library in Javascript with support for node.js. In this library, you can find advanced NLP functions for entity extraction, NLU, Microsoft bot framework, sentiment analysis, etc.

This is one of the best javascript libraries for NLP with more than 4k stars in the GitHub repository and is undergoing continuous development.

GitHub Repository


Javascript Library for Natural Language Processing

Compromise is a Javascript library for Natural Language Processing that can do some really cool stuff in your browser. It provides a long and impressive list of APIs to do basic and advanced NLP operations parsing, tokenization, case conversion, part of speech tagging, sorting, splitting, etc.

Besides the core out-of-box functionality, it also offers plugin extensions for some really cool features. To give you one example, you can use the extension of .number() function to do the mathematical operation with numbers in English. Isn’t it cool?


  var doc = nlp('two bottles of beer')
  document.body.innerHTML = doc.text()
  // 'one bottle of beer'

The library was has been created by Spencer Kelly and its Github repository which has almost 10K stars is still actively maintained by himself and a handful of contributors.

GitHub Repository


Javascript Library for Natural Language Processing

Neuro.js is a javascript framework for Natural language processing that is focused on building AI assistants and chatbots. Its standout features include multilabel classification, real-time classification, and online learning. Besides the core capabilities, it also offers feature engineering functionalities to help you build robust modes.

Neuro.js is also compatible with both browser execution and node.js making it a good option.

GitHub Repository


Javascript Library for Natural Language Processing

Natural is a natural language processing javascript library for node.js that offers a wide range of NLP operations. You can carry out basic to advanced NLP operations like tokenization, stemming, tf-idf, pos tagging, sentiment analysis, spellchecks etc. Another interesting thing about Natural is its integration with Wordnet but it is just in the experimentation phase.

Its Github repository has more than 9k stars and more than 120 contributors that have added support for other languages apart from English like Spanish, Russian, etc.

GitHub Repository

Javascript Libraries for Computer Vision


Javascript Library for Computer Vision

OpenCV.js is a javascript library for computer vision that is based on the popular OpenCV framework. It supports only limited modules of the Python version of OpenCV. The supported modules include –

  • Core
  • Image processing
  • Photo
  • Shape
  • Video
  • Object detection
  • Features framework
  • Image codecs

GitHub Repository


Javascript Library for Computer Vision

Tracking.js is a javascript library for computer vision that lets you implement various CV algorithms in your browser. It supports algorithms for object tracking,  color tracking, feature detection, convolution, grayscale, image blur, etc.

The popularity of tracking.js can be attributed to the fact that its GitHub repository has 8.7k stars, however, it has not seen much development in recent years and they are looking for maintainers for the repository.

GitHub Repository


Javascript Library for Computer Vision

WebGazer.js is a simple eye-tracking Javascript library that uses the webcam to infer the eye gazing of the visitors. It can be integrated easily with any website and runs purely in the user’s browser hence no data is sent back to the server. And to further tighten the security, it runs only when the user gives permission to enable the webcam.

WebGazer.js can help track user’s attention on the website and provide user experience accordingly. Its real-time gaze prediction is compatible with all major browsers.

With close to 3K stars its GitHub repository is quite popular and is still actively maintained.


Javascript Library for Computer Vision

Face-api.js is a javascript API for face recognition built on top of tensorflow.js that is compatible with the node.js and browser. Beyond regular facial recognition, it offers other capabilities as well like Face Similarity, Face Expression Recognition, Face Landmark detection, Realtime Face Tracking. Under the hood, this library uses models such as SSD Mobilenet V1, Tiny Face Detector, MTCNN to name a few.

Its Github repository has got 12K stars and is still somewhat actively maintained by its creator Vincent and other contributors.

GitHub Repository


Javascript Library for Computer Vision

Pico.js is a face detection javascript library that can detect faces in realtime within a streaming video from the webcam. Although there are similar APIs for face detection, the creator of Pico.js Nenad Markus has focused on keeping it lightweight with just 200 lines of code that is 2KB when minified.

Its GitHub also consists of another library Iploc.js which is also a tiny javascript library for real-time localization of eye pupil. Over 5K stars in its GitHub really signifies how popular this API is.

GitHub Repository


Coming to the end of this article, where we saw many interesting Javascript libraries for machine learning, data science, deep learning, NLP, and Computer Vision. It is great to see that there are so many options for the Javascript community as well to ride the wave of the AI revolution.

Follow Us

Leave a Reply

Your email address will not be published. Required fields are marked *