Published
Edited
Jun 1, 2021
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
markPoses(photoCanvas, poses, showLabels, showFacePoints, '#ff0000', '#eeeeee')
Insert cell
function markPoses(canvas, poses, showLabels, showFacePoints, pointColor, textColor) {
const context = canvas.getContext('2d');
context.font = '16px _sans';
context.textBaseline = 'top';
context.fillStyle = textColor;
context.strokeStyle = pointColor;
context.lineWidth = 2;
if (poses) {
poses.forEach(pose => drawPose(context, pose, showLabels, showFacePoints));
}
}
Insert cell
Insert cell
Insert cell
detector = await poseDetection.createDetector(model)
Insert cell
Insert cell
Insert cell
Insert cell
poseDetection = requireTF("@tensorflow-models/pose-detection@0.0.3/dist/pose-detection.js")
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