<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tensorflow-Js on Selvam Subbiah</title><link>https://selvamsubbiah.com/categories/tensorflow-js/</link><description>Recent content in Tensorflow-Js on Selvam Subbiah</description><generator>Hugo -- 0.154.3</generator><language>en-us</language><lastBuildDate>Sat, 11 Dec 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://selvamsubbiah.com/categories/tensorflow-js/index.xml" rel="self" type="application/rss+xml"/><item><title>TensorFlow.js - Remove or restore segments of an image in the browser using DeepLab model</title><link>https://selvamsubbiah.com/remove-restore-segments-of-an-image-in-the-browser-using-deeplab-model/</link><pubDate>Sat, 11 Dec 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/remove-restore-segments-of-an-image-in-the-browser-using-deeplab-model/</guid><description>&lt;p&gt;This article is a continuation of the &lt;a href="https://selvamsubbiah.com/semantic-image-segmentation-in-browser-using-deeplab/"&gt;previous article&lt;/a&gt;
on &lt;a href="https://en.wikipedia.org/wiki/Image_segmentation" target="_blank" rel="noopener noreferrer"&gt;Semantic Image Segmentation&lt;/a&gt;
in the browser using &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
pre-trained &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/deeplab" target="_blank" rel="noopener noreferrer"&gt;DeepLab&lt;/a&gt;
model. Here, we will use the DeepLab model’s output to manipulate specific parts of the image based on user selection. Essentially, we will allow the user to remove or restore a specific segment of an image that corresponds to an object class identified by the model.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img alt="deeplab - image segmentation demo" loading="lazy" src="https://selvamsubbiah.com/remove-restore-segments-of-an-image-in-the-browser-using-deeplab-model/images/remove-restore-deeplab-demo-output.gif"&gt;&lt;/p&gt;</description></item><item><title>TensorFlow.js - Semantic Image Segmentation in browser using DeepLab model</title><link>https://selvamsubbiah.com/semantic-image-segmentation-in-browser-using-deeplab/</link><pubDate>Sun, 05 Dec 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/semantic-image-segmentation-in-browser-using-deeplab/</guid><description>&lt;p&gt;In Computer Vision, one of the main challenges is to understand an image at a higher level like the way we humans do, i.e., to identify the objects, their location and their surroundings to make sense of the scene captured in the image. &lt;a href="https://en.wikipedia.org/wiki/Image_segmentation" target="_blank" rel="noopener noreferrer"&gt;Semantic Image Segmentation&lt;/a&gt;
is the process of identifying the objects present in the image and labelling each pixel by associating it to an identified object class. Semantic Image Segmentation can be applied to a wide variety of use cases such as human body segmentation, separating the background from foreground in an image, and understanding the surroundings for self-driving cars, just to name a few.&lt;/p&gt;</description></item><item><title>Face Landmarks Detection using MediaPipe Face Mesh in TensorFlow.js - Part 3</title><link>https://selvamsubbiah.com/mediapipe-iris-detection-in-tensorflow-js/</link><pubDate>Sun, 28 Nov 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/mediapipe-iris-detection-in-tensorflow-js/</guid><description>&lt;p&gt;This article is the continuation of the &lt;a href="https://selvamsubbiah.com/mediapipe-facemesh-triangles-in-tensorflow-js-part-2/"&gt;previous article&lt;/a&gt;
on MediaPipe Face Mesh model in TensorFlow.js, where we looked at creating the &lt;a href="https://en.wikipedia.org/wiki/Triangle_mesh" target="_blank" rel="noopener noreferrer"&gt;triangle mesh&lt;/a&gt;
of the face using the model’s output. Here, we will look at detecting and tracking iris within the eyes using the &lt;a href="https://google.github.io/mediapipe/solutions/iris.html" target="_blank" rel="noopener noreferrer"&gt;MediaPipe Iris&lt;/a&gt;
model.&lt;/p&gt;
&lt;h2 id="1-iris-detection"&gt;1. Iris Detection&lt;/h2&gt;
&lt;p&gt;MediaPipe Iris model accurately estimates the iris landmarks within the eye and tracks it. Iris detection &amp;amp; tracking can be used in augmented reality to create avatars and also to determine the distance of the camera to the user.&lt;/p&gt;</description></item><item><title>Facial Landmarks Detection using MediaPipe Face Mesh in TensorFlow.js - Part 2</title><link>https://selvamsubbiah.com/mediapipe-facemesh-triangles-in-tensorflow-js-part-2/</link><pubDate>Sun, 21 Nov 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/mediapipe-facemesh-triangles-in-tensorflow-js-part-2/</guid><description>&lt;p&gt;This article is the continuation of the &lt;a href="https://selvamsubbiah.com/mediapipe-facemesh-in-tensorflow-js/"&gt;previous article&lt;/a&gt;
on MediaPipe Face Mesh model in TensorFlow.js, where we looked at the basic usage of this model. Here, we will look at how to connect the 468 3D facial landmark predictions as multiple triangles to create a &lt;a href="https://en.wikipedia.org/wiki/Triangle_mesh" target="_blank" rel="noopener noreferrer"&gt;triangle mesh&lt;/a&gt;
of the face.&lt;/p&gt;
&lt;h2 id="1-triangle-mesh"&gt;1. Triangle Mesh&lt;/h2&gt;
&lt;p&gt;To create a triangle mesh from the 468 [x,y,z] coordinates, we will need to identify which are the set of points that need to be connected to form triangles. Luckily Google has provided those indexes for us to draw the triangle mesh. It is present in the &lt;a href="https://github.com/tensorflow/tfjs-models/blob/master/face-landmarks-detection/demo/triangulation.js" target="_blank" rel="noopener noreferrer"&gt;triangulation.js&lt;/a&gt;
file located in the Github repo of the pre-trained model.&lt;/p&gt;</description></item><item><title>Facial Landmarks Detection using MediaPipe Face Mesh in TensorFlow.js</title><link>https://selvamsubbiah.com/mediapipe-facemesh-in-tensorflow-js/</link><pubDate>Wed, 17 Nov 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/mediapipe-facemesh-in-tensorflow-js/</guid><description>&lt;p&gt;In this article, we will walk through an example to identify facial landmarks using the state of the art &lt;a href="https://google.github.io/mediapipe/solutions/face_mesh.html" target="_blank" rel="noopener noreferrer"&gt;MediaPipe Face Mesh model&lt;/a&gt;
. This model is present in the &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/face-landmarks-detection" target="_blank" rel="noopener noreferrer"&gt;Face Landmarks Detection package&lt;/a&gt;
in &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow&lt;/a&gt;
&lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;.js&lt;/a&gt;
library’s pre-trained model suite.&lt;/p&gt;
&lt;p&gt;This is part 1 of a series of articles in which we dive into the details of the Face Mesh model and its usage.&lt;/p&gt;
&lt;h2 id="1-overview"&gt;1. Overview&lt;/h2&gt;
&lt;p&gt;The MediaPipe Face Mesh model estimates 468 3D facial landmarks in real time covering the overall surface geometry of a human face. It also supports Iris detection that accurately tracks the iris within the eye. Iris detection when enabled provides an additional set of 10 landmarks - 5 points for each eye.&lt;/p&gt;</description></item><item><title>TensorFlow.js - Cricket Shot classification using Pose Detection</title><link>https://selvamsubbiah.com/tensorflow-js-cricket-shot-classification-using-pose-detection/</link><pubDate>Sat, 13 Nov 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/tensorflow-js-cricket-shot-classification-using-pose-detection/</guid><description>&lt;p&gt;In this article, we will look at how to use &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/pose-detection" target="_blank" rel="noopener noreferrer"&gt;Pose Detection&lt;/a&gt;
in &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
to classify cricket shots. In the game of cricket, there are many different shots played, such as cover drive, square cut, flick, sweep, straight drive, etc.&lt;/p&gt;
&lt;p&gt;In this example, we will attempt to classify three cricket shots - cover drive, flick and square cut. We will utilize &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/pose-detection/src/blazepose_tfjs" target="_blank" rel="noopener noreferrer"&gt;BlazePose TensorFlow.js model&lt;/a&gt;
to obtain the poses from images of players playing the above shots. We will then feed these poses data to a &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/knn-classifier" target="_blank" rel="noopener noreferrer"&gt;KNN classifier&lt;/a&gt;
to classify between these three shots.&lt;/p&gt;</description></item><item><title>Pose Detection using BlazePose in TensorFlow.js</title><link>https://selvamsubbiah.com/pose-detection-using-blazepose-in-tensorflow-js/</link><pubDate>Mon, 11 Oct 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/pose-detection-using-blazepose-in-tensorflow-js/</guid><description>&lt;p&gt;Human Pose Detection is fascinating as there are endless use cases and opens up the possibility for various kinds of applications which were earlier either difficult to build or required specialized hardware and software.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://selvamsubbiah.com/pose-detection-using-blazepose-in-tensorflow-js/images/yoga_pose_detection_result-1024x737.png"&gt;&lt;/p&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;em&gt;Photo by &lt;a href="https://unsplash.com/@matt909?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" target="_blank" rel="noopener noreferrer"&gt;Alex Shaw&lt;/a&gt;
on &lt;a href="https://unsplash.com/s/photos/yoga?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" target="_blank" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;
&lt;/em&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;In this article, I will walk you through the steps required to build a simple JavaScript app that detects human poses using &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/pose-detection" target="_blank" rel="noopener noreferrer"&gt;Pose Detection API&lt;/a&gt;
in &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
utilizing the &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/pose-detection/src/blazepose_tfjs" target="_blank" rel="noopener noreferrer"&gt;Mediapipe BlazePose&lt;/a&gt;
model.&lt;/p&gt;</description></item><item><title>Image Categorization using Object Detection in TensorFlow.js</title><link>https://selvamsubbiah.com/image-categorization-using-object-detection-in-tensorflow-js/</link><pubDate>Wed, 06 Oct 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/image-categorization-using-object-detection-in-tensorflow-js/</guid><description>&lt;p&gt;I have often wondered if I can build a tool that can accept custom queries to filter photos and images based on the items present in the image. There are some popular apps such as Google Photos, OneDrive, etc. which provide this sort of functionality to various degrees but they don’t necessarily let the user enter custom queries to filter images.&lt;/p&gt;
&lt;p&gt;In this article, we will look at utilizing &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
pre-trained &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/coco-ssd" target="_blank" rel="noopener noreferrer"&gt;COCO-SSD object detection model&lt;/a&gt;
to categorize and filter images.&lt;/p&gt;</description></item><item><title>Change background for videos using TensorFlow.js</title><link>https://selvamsubbiah.com/change-background-for-videos-using-tensorflow-js/</link><pubDate>Mon, 04 Oct 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/change-background-for-videos-using-tensorflow-js/</guid><description>&lt;p&gt;As most of us are working from home now, it has become a normal thing to set a custom background for our video calls through popular apps such as Zoom or Microsoft Teams. In this article, we will look at how to change the background for live webcam videos using &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img alt="Person Segmentation" loading="lazy" src="https://selvamsubbiah.com/change-background-for-videos-using-tensorflow-js/images/Person-Segmentation.png"&gt;&lt;/p&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;em&gt;Person Segmentation in action&lt;/em&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We will be making use of the &lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/body-pix" target="_blank" rel="noopener noreferrer"&gt;BodyPix model&lt;/a&gt;
which is a pre-trained &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
model. This model performs image segmentation - specifically person and human body parts segmentation.&lt;/p&gt;</description></item><item><title>Understanding the Real Time Person Removal project - TensorFlow.js</title><link>https://selvamsubbiah.com/understanding-the-real-time-person-removal-project-tensorflow-js/</link><pubDate>Sat, 02 Oct 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/understanding-the-real-time-person-removal-project-tensorflow-js/</guid><description>&lt;p&gt;Most of us interested in &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
would be familiar with the popular demo of &lt;a href="https://github.com/jasonmayes/Real-Time-Person-Removal" target="_blank" rel="noopener noreferrer"&gt;disappearing people in real time&lt;/a&gt;
by Jason Mayes. This is a fantastic example of what is possible using TensorFlow.js in the browser. Jason is gracious to share the code of this application for others to learn and implement their own versions of such applications. &lt;/p&gt;
&lt;p&gt;In this article, I will attempt to document and walkthrough this code, so that it helps anyone who is trying to understand the code for this app.&lt;/p&gt;</description></item><item><title>Object Detection using TensorFlow.js</title><link>https://selvamsubbiah.com/object-detection-using-tensorflow-js/</link><pubDate>Fri, 01 Oct 2021 00:00:00 +0000</pubDate><guid>https://selvamsubbiah.com/object-detection-using-tensorflow-js/</guid><description>&lt;p&gt;In this article, we will be building a simple app to detect objects on an image using &lt;a href="https://www.tensorflow.org/js" target="_blank" rel="noopener noreferrer"&gt;TensorFlow.js&lt;/a&gt;
library. To do this we will make use of the TensorFlow.js pre-trained “&lt;strong&gt;&lt;a href="https://github.com/tensorflow/tfjs-models/tree/master/coco-ssd" target="_blank" rel="noopener noreferrer"&gt;coco-ssd&lt;/a&gt;
&lt;/strong&gt;” model.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Object Detection" loading="lazy" src="https://selvamsubbiah.com/object-detection-using-tensorflow-js/images/Object-Detection_Result.png"&gt;&lt;/p&gt;
&lt;p&gt;In this example, user will browse and select an image file to identify objects present in that image. This selected image file is only handled on the client side within the browser and not uploaded to any server.  &lt;/p&gt;</description></item></channel></rss>