NatML for JavaScript
Zero Configuration Machine Learning Deployment
Effortless Machine Learning
// Fetch the ResNet image classifier model data
const modelData = await MLModelData.fromHub("@natsuite/resnet18");
// Create the model
const model = modelData.deserialize();// Create the ResNet classifier predictor
const predictor = new ResNet18Predictor(model, modelData.labels);// 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
Get NatML
Last updated