JavaScript
  • NatML for JavaScript
  • Preliminaries
    • Getting Started
  • Using Predictors
    • Core Concepts
    • Fetching Predictors
  • API Reference
    • IMLPredictor
    • IMLAsyncPredictor
    • MLModelData
    • MLModel
      • MLHubModel
      • MLEdgeModel
    • MLFeature
      • MLArrayFeature
      • MLAudioFeature
      • MLImageFeature
      • MLTextFeature
    • MLFeatureType
      • MLArrayType
      • MLAudioType
      • MLImageType
      • MLTextType
  • Insiders
    • Distributing Predictors
    • Changelog
    • GitHub
    • Discord
    • Blog
Powered by GitBook
On this page
  • Effortless Machine Learning
  • Zero Configuration Deployment
  • Get NatML

Was this helpful?

NatML for JavaScript

Zero Configuration Machine Learning Deployment

Effortless Machine Learning

NatML is a platform that brings extremely easy and quick machine learning to JavaScript. It allows you to run ML-powered features in your JS application--browser or NodeJS--without managing any ML infrastructure. In a few steps:

First, fetch a model:

// Fetch the ResNet image classifier model data
const modelData = await MLModelData.fromHub("@natsuite/resnet18");
// Create the model
const model = modelData.deserialize();

Then create a predictor to make predictions with the model:

// Create the ResNet classifier predictor
const predictor = new ResNet18Predictor(model, modelData.labels);

Finally, make predictions with the predictor:

// Create an image feature
const imageFeature = new MLImageFeature("/path/to/cat 🐱.jpg");
// Classify the cat image with our predictor
const [label, score] = await predictor.predict(imageFeature);
// Log the results to the console
console.log(`Our image contains a ${label} with confidence ${score}`);

Zero Configuration Deployment

NatML is designed for developers to quickly integrate ML functionality into their applications without any knowledge or effort put into building or managing ML infrastructure. Features include:

  • Extremely Easy to Use. NatML exposes machine learning models with simple functions that return familiar data types.

  • Bare Metal Performance. NatML runs predictions on powerful GPU's with incredibly high memory and network bandwidth, giving you the highest performance and minimal latency.

  • Computer Vision. NatML supports models for object classification, object detection, semantic segmentation, style transfer, and so much more.

  • Lightweight Package. NatML is distributed in a self-contained package weighing less than 100kb, with minimal external dependencies and no setup necessary.

Get NatML

# Install NatML
npm i natml --save
NextGetting Started

Last updated 3 years ago

Was this helpful?

Latest Models. offers a growing catalog of the latest ML models being published from research labs around the world.

NatML Hub
Logonpm: natmlnpm
Get NatML on NPM
LogoGitHub - natsuite/NatML-JS: Zero-infrastructure machine learning for JavaScript. Register at https://hub.natml.aiGitHub
Get NatML on GitHub