This package has been deprecated

Author message:

WARNING: This project has been renamed to @cloud-annotations/models. Install using @cloud-annotations/models instead.

@cloud-annotations/object-detection

0.0.8 • Public • Published

Object Detection JavaScript SDK

The Cloud Annotations Object Detection SDK makes it easy to use your custom trained object detection models in the browser or on the backend with TensorFlow.js. Simply point the object detector to your model_web folder and pass the loaded model a <canvas>, <img> or <video> reference.

Installation

npm install @cloud-annotations/object-detection

Usage

import objectDetector from '@cloud-annotations/object-detection'

const img = document.getElementById('img')

const model = await objectDetector.load('/model_web')
const predictions = await model.detect(img)

// predictions =>
[{
  bbox: [x, y, width, height],
  class: 'dog',
  score: 0.92
},
{
  bbox: [x, y, width, height],
  class: 'cat',
  score: 0.72
}]

Example usage: Real-Time Object Detection With React.

Package Sidebar

Install

npm i @cloud-annotations/object-detection

Weekly Downloads

3

Version

0.0.8

License

MIT

Unpacked Size

1.77 MB

Total Files

9

Last publish

Collaborators

  • bourdakos1