Video Analytics in 2 Lines of Code

In this article, I show you how to perform image recognition & video understanding tasks in just 2 lines of code, using TensorFlow.JS

To detect objects :

model = cocoSsd.load();

objects = model.detect(frame);

Model output tested on Olympics horse-riding game..

For video tagging :

model = mobilenet.load();

tags = model.classify(frame);

Model output tested on wild-life documentary films..

To capture Facial Expressions :

model = facemesh.load();

faces = model.estimateFaces(frame);

Model output tested on live video stream to detect facial expressions..

For Hand-Tracking :

model = handpose.load();

result = model.estimateHands(frame);

Model tested on live camera stream to generate music using hand gestures..

Or to move objects in AR / VR..

For body segmentation :

model = bodyPix.load();

pixel_array = model.segmentPersonParts(frame);

Model output tested on live camera stream..

And to create chroma-key effect by replacing background..

Yes, that’s how easy it is to use TensorFlow.JS

See code samples at : https://github.com/pamruta/TensorFlowJS

The rest of the Java Script just loads the video in HTML, scans it frame by frame and displays the output on screen..

--

--

--

Creative Media Technology || Website: pamruta.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Exploring Dewey Decimal Classification Through LSTM Neural Networks

DDC classification used in Hong Kong Library

Graph Representation Learning — Network Embeddings (Part 1)

Sound Classification with TensorFlow

Quit Trying to Predict The Market

The Simplest Guide to Logistic Regression

Artificial Neural Networks- An intuitive approach Part 2

What you’ll learn from fast.ai (V2) Lesson1

How to generate new data in Machine Learning with VAE (Variational Autoencoder) applied to Mnist…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amruta

Amruta

Creative Media Technology || Website: pamruta.com

More from Medium

Predict If the SQL Injection Query can get access to database or not using Machine Learning.

HaGRID — HAnd Gesture Recognition Image Dataset

Distracted Drivers Detection Computer-Vision Project

Deep Learning Project: Multilayer Perceptron