Creating fun body tracking applications with the Azure Kinect Developer Kit

The kit provides hardware/software to capture videos in color/depth and to extract body tracking information from them. In this article (and the companion github repo : mpdroid/bones), we explore use of this kit with Azure Cognitive Services to enhance how a person can interact with objects around them in 3-dimensional space.

What is inside the box?

Image for post
Image for post
Kinect DK Hardware

The hardware device is supported by two SDKs:

  • Sensor SDK — a C API to connect to and start the device, to extract depth and color images and to transform points between depth and color coordinate systems.
  • Body tracking SDK — also a C API, that extracts information about human bodies present in the FOV. Each body frame is composed of 32 joints (eyes, nose, head, hands, feet etc.), each characterized by a position and an orientation. The API also provides a “body index map”: a data structure that tells us which depth pixels belong to which body in the video frame. …


A step-by-step guide to breaking up a monolith

Image for post
Image for post
Spring Cloud Services to the rescue

This article demonstrates the use of Spring Cloud Services to break up a large monolithic application into a set of smaller micro-services that can change and grow with user needs.

The companion code is available in github repo: mpdroid/whoppr. Pre-requisites are Jdk1.8, MongoDB and Gradle 6+. IDE is optional.

What is a Monolith?

Much has been written about monoliths about why they are not ideal, and how they should be dismantled. The perspective here is that any application that violates the Single Responsibility Principle is a monolith.

Monolithic applications, like overloaded pieces in chess, serve multiple stakeholders with potentially conflicting needs. Over time, they accumulate indispensable but quirky features that are costly to change. …


A trilogy in four parts

Image for post
Image for post

After installing the hardware and software, it is time to figure out how much power you really have. Was the blood and coin really worth it?

Short answer: A definite maybe.

Benchmark Scripts

The first benchmark script is a copy of a Fast-AI tutorial that trains a ResNet model to recognize numbers from the MNIST image data set. …


A trilogy in four parts

Image for post
Image for post
en:User:Cburnett [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/)]

Once the brand new deep learning box is assembled and BIOS is verified, we install system and application software.

The most important decision is operating system and version. I settled on Linux Ubuntu because it is free and both Colab and Kaggle run Ubuntu images (as of writing date).

In my build, both GPU and Motherboard officially support only Windows. I am not sure about what level of support I will get if I have to call them. …


A trilogy in four parts

Image for post
Image for post

This series is a step-by-step walk-through on how to build a GPU tower dedicated to train deep neural nets.

The good news is that the hardware assembly procedure is not complicated. The bad news is that botching it up is easy and very costly. So it pays to prepare well; read all the product manuals twice over and watch as many YouTube videos as you can before starting the build.

This one helped me the most:

The motherboard manual provides the complete installation sequence. Specific instructions for individual components can be obtained from their manuals and YouTube videos. The overall and generic installation sequence is as…


A trilogy in four parts

Image for post
Image for post

This series is a step-by-step walk-through on how to build a GPU tower dedicated for training deep neural nets.

I have relied on the following resources to plan my build and as such these resources can provide readers with a much richer understanding of the component selection rationale.

The intent here is to document one build executed at a specific point in time (December 2019), with emphasis on detailed steps and challenges encountered along the way. …


To help Java programmers achieve a “Pythonic” state of mind

Image for post
Image for post
Leonardo da Vinci [Public domain], via Wikimedia Commons - Image transformed to grayscale using NumPy (gist)

This article is intended to help Java programmers who, on their path to machine-learning glory, must first ease into Python.

We’ll only cover the very basic collection types and their operations. References include more comprehensive tutorials and documentation.

Tuple and List

Tuple

A tuple is an immutable, heterogeneous, sequence of values. This is a very useful data structure that does not exist in Java.

>>> a_tuple = ((1,2,3,4), 'is a', 'sequence of', 4, 'numbers') 

A tuple is heterogenous as it can hold items of any type: primitives, objects, other tuples, arrays, and so on. It is a sequence because it is indexable and iterable.

>>> a_tuple[1]
'is…


4 elementary sorting algorithms

These are the 4 elementary sorting methods everyone must know.

No code? No problem. We will keep it visual.

Bubble Sort

Image for post
Image for post
“Bubble” up the cards slowly into their proper position.

Step 1: Moving from left two right, pick two cards at a time.

Step 2: Swap them if they are out of order.

Step 3: Do many passes until all cards are sorted.

Practice bubble sort at the dojo.

Insertion Sort

Image for post
Image for post
“Insert” cards one at a time into their proper position.

Step 1: Moving from left to right, pick each card.

Step 2: Move it to its proper position among others to its left.

Step 3: And so on, until you reach the end.

Practice insertion sort at the dojo.

Selection Sort

Image for post
Image for post
“Select” the next best card, move it into its proper position, rinse and repeat.

Step 1: Moving from left to right, pick each card. …


What better way to demonstrate its awesomeness than to stream audio input into psychedelic visuals

Image for post
Image for post
LED display of audio stream using D3

D3 is a powerful JavaScript framework for data visualization. Most agree. What better way to demonstrate its awesomeness than to stream audio input into psychedelic visuals?

Open this link in a Chrome browser, grant permission to use audio, play your favorite music, and watch the magic unfold. Visit this GitHub repo to see the code.

Web Audio API Basics (and a Cautionary Tale…)

We use the Web Audio API to connect to the computer’s microphone and extract audio data.

Step 1: Obtain the microphone output as a stream.

navigator.mediaDevices.getUserMedia({ audio: true })
.then((stream) => {
this.gotStream(stream);
}, (error) => {
... handle the error gracefully please
});
gotStream(stream) {
... process the audio stream…


Key aspects necessary for creating production-ready code

Image for post
Image for post
Real-time pizza delivery lead-time frequency distribution (fictional data)

This article shows you how to build reactive charts inside an Angular 8 application using the D3 JavaScript framework.

While there are a number of good articles and discussion threads covering this topic (some listed in the references), I have attempted to bring together all the key aspects necessary for creating production-ready code.

Why D3 on Top of Angular?

D3’s (Data-Driven-Documents) core capability is to manipulate DOM elements in response to dynamic application data. But, so it is for Angular, React, jQuery, and a host of other frameworks.

The motivation to use the D3 (or similar) framework with Angular is to provide the following data visualization…

About

Rajaram Gurumurthi

Tech

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