Platform
Resources
Pricing
Sign in
Get started
Sundar Singh
playing with space, shape, colour & composition
Workspace
Fork
Published
By
Sundar Singh
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
imageUrl
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
img
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
results
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ml5
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML