Published
Edited
Jan 10, 2022
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// load image into observable
img = html`<img src=${imageUrl} crossOrigin="anonymous" >`
Insert cell
Insert cell
results = ml5.imageClassifier('MobileNet')
.then(classifier => classifier.classify(img))
.then(results => {
// return results[0].label;
// return results[0].confidence.toFixed(4);
return results
})
Insert cell
Insert cell
Insert cell
Insert cell
ml5 = require("ml5@0.7.1")
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more