1.0.24 • Published 2 months ago

landingai v1.0.24

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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

1.0.24

2 months ago

1.0.22

11 months ago

1.0.21

11 months ago

1.0.20

11 months ago

1.0.16

11 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago