Module landingai - v1.0.24

landingai

Core functions for getting predictions from LandingLens cloud deployment endpoints and rendering predictions.

npm install landingai
# OR
yarn add landingai

Usage

Getting prediction results

// 1. setup endpoint and credentials
const apiInfo = {
endpoint: "https://predict.app.landing.ai/inference/v1/predict?endpoint_id=<endpoint_id>",
key: "<api_key>",
secret: "<api_secret>",
}
// 2. get an image and convert to blob
const blob = await fetch("url-to-image").then((response) => response.blob());
// 3. get predictions from the blob
const { backbonepredictions } = await getInferenceResult(apiInfo, blob);
// 4. convert to annotations for rendering
const annotations = predictionsToAnnotations(backbonepredictions);
// render annotations

References

Index

Classes

Interfaces

Type Aliases

Variables

Functions

Generated using TypeDoc