All Projects β†’ stackml β†’ stackml-js

stackml / stackml-js

Licence: other
Machine Learning platform in-browser for creators

Projects that are alternatives of or similar to stackml-js

dark-mode-clap-extension
Chrome extension to toggle dark mode on Netlify by clapping hands πŸ‘
Stars: ✭ 82 (+141.18%)
Mutual labels:  tensorflowjs, tfjs
nanodet
NanoDet: Tiny Object Detection for TFJS and NodeJS
Stars: ✭ 19 (-44.12%)
Mutual labels:  tensorflowjs, tfjs
Face Api.js
JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
Stars: ✭ 13,258 (+38894.12%)
Mutual labels:  tensorflowjs, tfjs
aio-rek
Face recognition based attendance system
Stars: ✭ 19 (-44.12%)
Mutual labels:  tensorflowjs, tfjs
Face-Mask
Real time webcam face detection, protect yourself from COVID19 with a virtual mask
Stars: ✭ 64 (+88.24%)
Mutual labels:  tensorflowjs, tfjs
splat
Motion-controlled Fruit Ninja clone using Three.js & Tensorflow.js
Stars: ✭ 84 (+147.06%)
Mutual labels:  tensorflowjs, tfjs
pigallery
PiGallery: AI-powered Self-hosted Secure Multi-user Image Gallery and Detailed Image analysis using Machine Learning, EXIF Parsing and Geo Tagging
Stars: ✭ 35 (+2.94%)
Mutual labels:  image-classification, tfjs
intenseye-boun-workshop
Code for the workshop in BOUN Tech Summit (03.03.2019)
Stars: ✭ 32 (-5.88%)
Mutual labels:  tensorflowjs
denoised-smoothing
Provably defending pretrained classifiers including the Azure, Google, AWS, and Clarifai APIs
Stars: ✭ 82 (+141.18%)
Mutual labels:  image-classification
encrypted-skin-cancer-detection
Detecting skin cancer in encrypted images with TensorFlow
Stars: ✭ 27 (-20.59%)
Mutual labels:  image-classification
Billion-scale-semi-supervised-learning
Implementing Billion-scale semi-supervised learning for image classification using Pytorch
Stars: ✭ 81 (+138.24%)
Mutual labels:  image-classification
solid-client-js
Library for accessing data and managing permissions on data stored in a Solid Pod
Stars: ✭ 201 (+491.18%)
Mutual labels:  javascript-library
StyleSight
Browser based 'real-time' AR 'fast' neural style transfer using tensorflowjs
Stars: ✭ 15 (-55.88%)
Mutual labels:  tensorflowjs
img classification deep learning
No description or website provided.
Stars: ✭ 19 (-44.12%)
Mutual labels:  image-classification
js-gym
Reinforcement learning in JavaScript & Node.js
Stars: ✭ 50 (+47.06%)
Mutual labels:  tensorflowjs
jvm.js
A Java VM bytecode library written in ES6 for Node.js
Stars: ✭ 33 (-2.94%)
Mutual labels:  javascript-library
backprop
Backprop makes it simple to use, finetune, and deploy state-of-the-art ML models.
Stars: ✭ 229 (+573.53%)
Mutual labels:  image-classification
image features
Extract deep learning features from images using simple python interface
Stars: ✭ 84 (+147.06%)
Mutual labels:  image-classification
Xception-with-Your-Own-Dataset
Easy-to-use scripts for training and inferencing with Xception on your own dataset
Stars: ✭ 51 (+50%)
Mutual labels:  image-classification
awesome-app-js
This document list all the javascript libs used at Soixante circuits. They are compatible with Webpack and run in the browser and / or node only.
Stars: ✭ 16 (-52.94%)
Mutual labels:  javascript-library

StackML

StackML is a simple GUI tool for non-AI people to use machine learning in browser.

This github repository hosts StackML Javascript library which enables you to use machine learning models in your web app with few lines of code.

StackML provides two main functionalities

  1. Use pre-trained models
  2. Train a model on your own dataset

Use pre-trained models

Train a model on your own dataset

Live Demo

Full Documentation

Table of Contents

Examples of StackML models

Image Classification

YOLO

PoseNet

BodyPix

Face Detection

Face Landmark Detection

Face Expression Recognition

Getting Started

Access key

Get your access key here

Setup

Add the following script tag to your main HTML file to include StackML library.

<script src="https://stackml.com/library-js/stackml.min.js">

How to use

Below is a complete example to use Image classification model on an image using StackML library.

<html>
<head>
    <head>
        <title>Getting Started with StackML</title>
        <script src="https://stackml.com/library-js/stackml.min.js"></script>
    </head>

<body>
<h1>An example to use Image classification model with StackML library</h1>
<p>The model recognized the image as <span id="className">...</span> with a confidence of <span id="probability">!!!</span></p>
<img src="https://s3-us-west-2.amazonaws.com/stackml/docs/images/red_fox.jpeg" crossorigin="anonymous" id="red_fox" width="500">

<script>
    callStackML();

    async function callStackML() {
        //provide the access key
        await stackml.init({'accessKeyId': '<YOUR ACCESS KEY>'});

        //load the model
        const model = await stackml.imageClassifier('MobileNet', callbackLoad);

        // make prediction with the image
        model.predict(document.getElementById('red_fox'), callbackPredict);

        // callback on model load
        function callbackLoad() {
            console.log('model loaded!');
        }

        // callback after prediction
        function callbackPredict(err, results) {
            //display the results
            document.getElementById('className').innerText =
                results['outputs'][0].className;
            document.getElementById('probability').innerText =
                results['outputs'][0].probability.toFixed(4);
        }
    }
</script>
</body>
</html>

Pre-trained models

Pre-trained models are machine learning models which are already trained on a large number of dataset & are ready to use.

Image Classification

Image classification is the simplest & widely used deep learning model. The model can take an image & assign one or more classes from a fixed set of categories (it's trained on). Image classification provided (MobileNet) is pre-trained on 15 million images spreaded into 1000 categories like airplane, dog etc.

Self driving cars are a great example to understand where image classification is used in real world.

Loading the model

const classifier = await stackml.imageClassifier(modelType, callback?);
Parameters Description
modelType Type of model to use for image classification. Available model: 'MobileNet'
callback Optional. Callback function gets called after the model load is complete.

Predicting

classifier.predict(input, callback?, options?);
Parameters Description
input HTML image or video element.
callback Optional. Callback function gets called after the model prediction is complete.
options Optional. Additional option to change model performance & accuracy. Refer below table. Example - {numberOfClasses:3}

YOLO

You only look once (YOLO) is an object detection model which helps to identify the location of an object in the image. It will output the coordinates of the location of an object with respect to the image.

It is widely used in computer vision task such as face detection, face recognition, video object co-segmentation.

Loading the model

const yolo = await stackml.YOLO(callback?);

Detecting objects

yolo.detect(input, callback?);

Draw optput

yolo.draw(canvas, input, results);

PoseNet

PoseNet is a pose estimation model which detects human postures in images and video, so that one could determine, for example, where someone’s elbow shows up in an image. It can be used to estimate either a single pose or multiple poses.

PoseNet detects 17 key points to determine human body posture like nose, left-eye, left-ear, left shoulder... etc.

Loading the model

const posenet = await stackml.poseNet(callback?);

Detecting human poses

posenet.detect(input, callback?);

Draw optput

posenet.draw(canvas, input, results);

BodyPix

BodyPix is a pre-trained model to perform Person Segmentation on an image or video. In other words, BodyPix can classify the pixels of an image into two categories: 1) pixels that represent a person and 2) pixels that represent background.

Loading the model

const model = await stackml.bodypix(callback?);

Segmenting human body from background

model.detect(input, callback?);

Draw optput

model.draw(canvas, input, results);

Face Detection

Face Detection model is used to detect human face in an image or video. It can be regarded as a specific case of object-class detection. Face Detection will output coordinates of box locating the human face.

Loading the model

const model = await stackml.faceDetection(callback?);

Detecting human faces

model.detect(input, callback?);

Draw optput

model.draw(canvas, input, results);

Face Landmark Detection

Face Landmark Detection also known as Face Feature Detection model detects 68 facial keypoints in an image.

Loading the model

const model = await stackml.faceLandmark(callback?);

Detecting human face key points

model.detect(input, callback?);

Draw optput

model.draw(canvas, input, results);

Face Expression Recognition

Face Expression Recognition model detects human face & predicts whether the person is sad happy angry & so on. It will out the prediction in seven categories of expressions ie; neutral, happy, sad, angry, fearful, disgusted & surprised. It will also output coordinates of box locating the human face.

Loading the model

const model = await stackml.faceExpression(callback?);

Detecting human faces

model.detect(input, callback?);

Draw optput

model.draw(canvas, input, results);

User trained models

After you train a machine learning model on your own dataset using StackML platform, use following code to run prediction on it.

Image Classification

Image classification is the simplest & widely used deep learning model. The model can take an image & assign one or more classes from a fixed set of categories (it's trained on). Image classifier provided (MobileNet) is pre-trained on 15 million images spreaded into 1000 categories like airplane, dog etc.

Self driving cars are a great example to understand where image classification is used in real world.

Example

const modelPath = 'https://foo.bar/your_model.json';
await stackml.init({'accessKeyId': <YOUR ACCESS KEY>});
// load user image classifier model using Mobilenet
const model = await stackml.imageClassifier('MobileNet', callbackLoad, modelPath);

// make prediction with the image
model.predict(document.getElementById('image'), callbackPredict);

// callback on model load
function callbackLoad() {
    console.log('model loaded!');
}

// callback after prediction
function callbackPredict(err, results) {
    console.log(results);
}

Loading the model

const model = await stackml.imageClassifier(modelType, callback?, modelPath);

Predicting

classifier.predict(input, callback?, options?);

Numeric Classification

Numeric classification is the simplest & widely used deep learning model. The model takes a csv & assign one or more classes from a fixed set of categories (it's trained on).

You can train numeric classification model on your own dataset.

Loading the model

const model = await stackml.numericClassifier(modelPath, callback?);

Predicting

classifier.predict(input, callback?, options?);

Numeric Regression

Numeric regression is the simplest & widely used deep learning model. The model takes an input csv & calculates an output for each row.

Loading the model

const model = await stackml.numericRegression(modelPath, callback?);

Predicting

classifier.predict(input, callback?, options?);

Terms of use

Read it here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].