AIZOO version of bbject detection model (coco-ssd) in TensorFlow.js
npm install @aizoo/coco-ssdObject detection model that aims to localize and identify multiple objects in a single image.
This model is a TensorFlow.js port of the COCO-SSD model. For more information about Tensorflow object detection API, check out this readme in
tensorflow/object_detection.
This model detects objects defined in the COCO dataset, which is a large-scale object detection, segmentation, and captioning dataset. You can find more information here. The model is capable of detecting 90 classes of objects. (SSD stands for Single Shot MultiBox Detection).
This TensorFlow.js model does not require you to know about machine learning.
It can take input as any browser-based image elements (, ,
elements, for example) and returns an array of bounding boxes with class name and confidence level.
There are two main ways to get this model in your JavaScript project: via script tags or by installing it from NPM and using a build tool like Parcel, WebPack, or Rollup.
``html

`
`js
// Note: you do not need to import @tensorflow/tfjs here.
import * as cocoSsd from '@tensorflow-models/coco-ssd';
const img = document.getElementById('img');
// Load the model.
const model = await cocoSsd.load();
// Classify the image.
const predictions = await model.detect(img);
console.log('Predictions: ');
console.log(predictions);
`
You can also take a look at the demo app.
#### Loading the model
coco-ssd is the module name, which is automatically included when you use the