Public
Edited
Oct 30, 2024
Insert cell
Insert cell
Insert cell
ml5 = require("ml5@0.12.1");
Insert cell
Insert cell
P5 = require('https://unpkg.com/p5@1.9.2/lib/p5.js');
Insert cell
import {p5} from "@tmcw/p5";
Insert cell
CT = require("https://cdnjs.cloudflare.com/ajax/libs/color-thief/2.3.0/color-thief.umd.js");
Insert cell
colorThief = new CT();
Insert cell
Insert cell
clasificadorGenerico = ml5.imageClassifier('MobileNet');
Insert cell
extractorCualidades = ml5.featureExtractor('MobileNet');
Insert cell
clasificadorEntrenado = extractorCualidades.classification();
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
classification.data
Insert cell
Insert cell
classification.list
Insert cell
Insert cell
Plot.plot({
width,
height: 400,
marks: [
Plot.cell(classification.data, {
x: "i",
fill: d => `rgb(${d.palette[0][0]},${d.palette[0][1]},${d.palette[0][2]})`
})
]
})
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