Please disable your adblock and script blockers to view this page

Machine learning for everyone: How to implement pose estimation in a browser using your webcam


TNW
Google Brain
IBM Blue
ML
TensorFlow
PyTorch
further.“ml5.js
CNN
respectively).It
index.html.We
PoseNet
webcam_output.hide(
drawSkeleton
JavaScript
RGB
noStroke
ellipse(x_value
Model
ID
NLP


Kartik Nighania
Syndication The
Lee Sudol
Gary Kasparov
Baskin
Robbins
p5.js
createCanvas(width
640px
Kaggle
Boris


Chinese

No matching tags

No matching tags

No matching tags

No matching tags

Positivity     46.00%   
   Negativity   54.00%
The New York Times
SOURCE: https://thenextweb.com/syndication/2020/02/01/machine-learning-for-everyone-how-to-implement-pose-estimation-in-a-browser-using-your-webcam/
Write a review: The Next Web
Summary

Research communities are thriving in ML, from 100 papers submitted annually 10 years ago, to 100 per day in 2019 on arXiv alone.But, keeping everything aside, the point is that ML is highly math-intensive.While libraries like TensorFlow and PyTorch have made a significant contribution in making ML reachable to all the developers out there, we still have a steep learning curve to know how to create models, train them, and save it to later use it for our tasks.That is where ml5.js comes in, a library based on TensorFlow.js, which was launched last year in March, taking the vision even further.“ml5.js aims to make machine learning approachable for a broad audience of artists, creative coders, and students. A ready-to-use model that has pre-trained CNN inside it and takes an image as input and outputs a keypoint heatmap and offset vectors.By using these representations and a little bit of math magic, we finally find the 17 keypoints, as shown in the image, to detect a complete human pose.The model also returns how confident it is, by giving a keypoint confidence score to each of the 17 points on a scale of 0–1 (where 1 is 100% confident and 0.56 means 56%, respectively).It also returns the overall pose confidence score of detecting human pose in an image, also on a scale of 0–1.We will use a webcam as the video input to our pose estimation model and show the output on our main page index.html.We are using two libraries here:I’ve added extensive documentation inside the code, explaining every single line. We call fill(red, green, blue), taking RGB intensity value ranging from 0 to 255 to decide the color of a point, and noStroke() to disable drawing the outline that p5 draws by default.Then, we call ellipse(x_value, y_value, width, height) to draw an ellipse at the desired position but we keep the width and height very small, which makes them look like a dot (exactly what we wanted).</p>Similarly, as our variable poses has multiple pose‘s in it, it also has multiple skeleton values with their own type of key-value pairs, which is handled by drawSkeleton() drawing lines instead of points.This is the main page where we display our output. You can always go to the ml5.js reference page, which has many more ready-to-use mode and code snippets for various cool ML projects, dealing with a wide variety of things like text, images, and sound.Kartik Nighania is a a machine learning enthusiast who loves computer vision more than NLP.

As said here by Kartik Nighania