Skip to content
All work

Sign Language Interpretation System

Control any smart device with American Sign Language — hand tracking, a gesture classifier and grammar correction, wired together over a client-server link.

Type
Capstone
Year
2021
Built with
Python · TensorFlow · MediaPipe · C++ · Computer vision · CNN

Smart homes assume you talk to them. My senior capstone team at Missouri State asked what happens if you sign to them instead. Voice assistants like Alexa and Google Home are ubiquitous, but they quietly exclude Deaf and hard-of-hearing users from hands-free smart device control.

Our team—Braden Bagby, David Gray, Riley Hughes, Zachary Langford, and Robert Stonner—set out to build an accessible alternative: a system that lets a user control smart home technology by spelling commands in American Sign Language (ASL) in front of a standard camera, with our demonstration controlling smart lights via IFTTT.

The full methodology, system architecture, and evaluation benchmarks are published in our research paper: Simplifying Sign Language Detection for Smart Home Devices using Google MediaPipe.

The architectural challenge: separating edge from inference

Most previous work in computer vision sign language detection relied on monolithic convolutional neural networks running directly on high-dimensional raw video frames. That approach has two fatal flaws for real-world smart devices: it demands expensive local compute that low-power edge gadgets lack, and raw-pixel CNNs are notoriously fragile to changes in background, skin tone, and lighting.

We solved both problems by decoupling the system across two axes:

  1. Client-server separation: A lightweight edge client handles camera capture and actuation, offloading inference to a central server.
  2. Perception vs. classification decoupling: Instead of classifying raw pixels end-to-end, we used Google MediaPipe to reduce complex video frames into normalized 3D hand skeletal landmarks, then trained a specialized, fast neural network purely on landmark coordinate tensors.
[ Camera Client ]
       │
       ▼  Custom UDP Video Stream (packet slicing + zlib)
[ Server UDP Receiver ]
       │
       ▼  JPEG over TCP
[ MediaPipe Run (C++ Custom Calculator) ]  ──► 21 3D hand landmarks (63 floats)
       │
       ▼  TCP Socket
[ Gesture Classifier (TensorFlow CNN) ]    ──► Letter predictions (98.8% acc)
       │
       ▼  IPC
[ Grammar & Autosuggest (Levenshtein) ]    ──► Command resolution
       │
       ▼  TCP Socket
[ Command Dispatcher ] ──────────────────────► Smart Home API (IFTTT)

Video streaming over UDP

To allow inexpensive smart devices to act as input nodes, we built a custom application-layer network protocol over UDP. OpenCV captures video frames as NumPy arrays (480×60×3480 \times 60 \times 3). The client divides each frame into 20 slices, prepends a 40-byte custom header (frame sequence, frame size, slice sequence, slice size), and streams them via UDP.

The server reassembles arriving slices onto a priority heap buffer. A configurable timeout window balances latency against frame glitching. Reassembled frames are JPEG-encoded and streamed via TCP into our MediaPipe pipeline.

Extending MediaPipe with custom C++ calculators

MediaPipe Hands isolates the palm and tracks 21 3D hand landmarks normalized to [−1,1][-1, 1] (63 floating-point coordinates). To integrate MediaPipe cleanly into our distributed pipeline, we wrote custom C++ Calculator nodes and compiled two specialized builds:

  • MediaPipe Trainer: A command-line utility using OpenCV to read image files from our training set, extract hand landmarks, and write structured CSV datasets.
  • MediaPipe Run: A persistent daemon listening to incoming JPEG streams over TCP and streaming extracted 21-point coordinate arrays over TCP to our classifier in real time.

My part: the gesture classifier

I designed, trained, and evaluated the core gesture classification subsystem in TensorFlow.

Instead of passing heavy image matrices into a vision backbone, we fed our network the 21 3D coordinates extracted by MediaPipe. We shaped the 63 coordinates into finger-specific tensors, mapping the natural kinematic structure of the hand.

The network architecture consists of:

  • Three 2D Convolutional layers with ReLU activation functions, extracting spatial relationships and joint-angle features across fingers.
  • Flatten layer connecting feature maps into a high-capacity dense representation.
  • Dense fully connected layer with ReLU activation.
  • Softmax output layer producing class probabilities.

Dataset curation & training

We started with a dataset of approximately 15,000 raw ASL images across the alphabet (A–Z). When running static frames through MediaPipe, single-frame palm detection can sometimes produce noisy or misaligned landmarks. We cleaned and curated the dataset, validating the extracted coordinate sets to roughly 300 high-quality landmark examples per gesture.

Empirical findings: 20 classes vs. 14 classes

In our initial 20-gesture experiment, the classifier reached 62% accuracy (weighted precision 50%, recall 62%, F1 54%). Analyzing the confusion matrix revealed clear points of failure: static 3D landmarks struggled with letters requiring dynamic motion or having near-identical static shapes without depth context (such as confusing J for I, Y for L, G for L, and D for C).

By pruning gestures that require trajectory tracking or produced high visual overlap (G, J, R, S, T, V), our 14-class model achieved 98.8% accuracy with weighted average precision, recall, and F1-score all at ~99%, with only trace confusion across C, D, E, and F (<1% of test samples).

Grammar correction and IoT execution

Raw gesture output can still suffer from occasional single-frame misfires. We coupled the classifier with a grammar module that acts as a real-time autocomplete and autosuggest engine.

Using Levenshtein edit distance against a dictionary of valid smart home command phrases (e.g., “LIGHT ON”, “LIGHT OFF”), the grammar module corrects isolated character misclassifications before dispatching instructions over a TCP socket to the command client, which triggers smart light states via IFTTT webhooks.

Real-time latency budget

For a smart device interface, responsive feedback is critical: latency over 500 milliseconds feels broken, while sub-250 milliseconds feels instantaneous. Timing benchmarks across live video feeds confirmed:

Pipeline StageAverage Latency
MediaPipe landmark extraction71 ms
Gesture neural classifier inference156 ms
Grammar correction & command routing1–2 ms
Total core interpretation latency227 ms

At 227 ms end-to-end, the interpretation pipeline sits comfortably inside the real-time interaction budget.


The complete research paper is available as a PDF: Download Research Paper (PDF). Source code and project documentation are hosted on GitHub.

Writing

More on this project

Let's connect

Have something hard that has to work?

Contract work, a full-time role, or a problem you want a second opinion on — I read every message and reply to the ones that aren't a template.

Email me

Usually replies within a day or two · St. Louis, Missouri

ESC

Home

Main landing page & highlights

Page

Work

All engineering projects & case studies

Page

Writing

Technical notes & engineering articles

Page

Games

Browser games, several against real models

Page

About

Background, career timeline & skills

Page

Contact

Email, inquiries & consultation

Page

Copy Email Address

davidgraymi@gmail.com

Action

Toggle Light / Dark Theme

Switch color theme

Action

Resume

Web page, with a PDF download

Read

Visit GitHub

github.com/davidgraymi

External

Visit LinkedIn

linkedin.com/in/david-gray-mi

External

Beat the bot

Tetris against the value network from my reinforcement-learning project. Same pieces, two minutes, most lines wins.

Game

Draw a digit

Draw 0–9 and watch a weighted KNN classifier find its nearest MNIST neighbours as you go.

Game

Is it poisonous?

A real mushroom from the UCI dataset. Make your call, then watch an ID3 decision tree make its own.

Game

Route the robots

Draw a warehouse, place robots and goals, and race a LaCAM multi-agent path-finding solver to the shortest plan.

Game

Daily Wordlet

One five-letter word a day, the same for everyone. Six guesses.

Game

Bot or human?

14 rounds. One line from a public-domain classic, one written by a language model. Spot the bot.

Game

Reaction test

Wait for the panel to light up amber, then hit it as fast as you can.

Game

Lost signal

The 404 page's dodge game. Packets rain down; steer the receiver out of the way.

Game

neural-cost

A framework-neutral Python library that tells you how fast a neural network should run, not just how fast it does — FLOPs, tensor traffic and a roofline model across PyTorch, JAX and TensorFlow.

Personal

Sign Language Interpretation System

Control any smart device with American Sign Language — hand tracking, a gesture classifier and grammar correction, wired together over a client-server link.

Capstone

Patient Care Portal Triage

An NLP pipeline that routes patient portal messages to the right team and surfaces relevant evidence-based research while they wait for a human.

Research

Threat modeling a zero-trust deployment pipeline

A continuous deployment pipeline for configuration-as-code and infrastructure-as-code into Kubernetes, designed from its threat model outward so the release process does the security review.

Professional

Moving three toolchain apps to Kubernetes on Azure

Three toolchain applications moved to Kubernetes on Azure, deployed one way with Helm and infrastructure-as-code, and secured with an Istio service mesh.

Professional

A processor built from the ground up

Kernel, task scheduler and communication protocol written from nothing, in C and Ada, now in production and distributed globally.

Professional

A system library that runs anywhere

One portable C++ library targeting any RTOS or bare-metal system, packaged with Docker, Bazel and GitLab CI — cutting porting work by 4×.

Professional

LaCam for Multi-Agent Path Finding

A from-scratch LaCam solver for CS440 — agents searching a space of joint configurations, each expanded by a constraint tree that rules out collisions and swaps.

School

Bindersnap

GitHub for everyone who doesn't use GitHub — document management, review lifecycle, team collaboration, search and an in-browser editor.

Personal

Wordlet

A word guessing game built in Flutter and compiled to the web — playable right here, no install, no account.

Personal

Reinforcement Learning applied to Tetris

An agent that learns to play Tetris — a genuinely fun excuse to get hands-on with reward shaping.

School

Handwritten digit recognition with weighted KNN

A KNN classifier for handwritten digits, plus a k-value optimizer that collapses repeated distance calculations into a single pass.

School

ID3 mushroom classification

A from-scratch ID3 decision tree that predicts whether a mushroom is edible or poisonous from its attributes.

School

Healthcare length-of-stay estimator

A data mining project predicting how long a patient will stay, from admission-time features.

School

This website

A static site built with Astro, hosted free on GitHub Pages, designed so writing a post costs one markdown file and nothing else.

Personal

An Unexpected Email, REPRO-SIGN, and 11 Citations on Google Scholar

Years after our college capstone, an out-of-the-blue email from European AI researchers wanting to reproduce our sign language paper sent me to Google Scholar, where we've been cited 11 times.

Post

Connecting the Dots: How a Sign Language Capstone Got Me Hooked on AI

Looking back at my senior capstone project at Missouri State — building a real-time American Sign Language smart home controller with MediaPipe, custom CNNs, and networking — and how it sparked my path in machine learning.

Post

GPU vs. CPU: Roofline Benchmarks on Apple Silicon MPS with neural-cost v0.2.0

The neural-cost v0.2.0 GPU benchmark moves from CPU roofline analysis to Apple Silicon's MPS GPU backend — measuring PyTorch and JAX across five architectures, four batch sizes, and both eager and compiled execution modes.

Post

PyTorch vs. JAX vs. TensorFlow: A Roofline Benchmark Across 5 Architectures

An empirical investigation comparing PyTorch 2.14, JAX 0.11, and TensorFlow across five model architectures and four batch sizes, measuring compiler speedups, kernel overheads, and hardware limits on Apple Silicon.

Post

neural-cost: Roofline Analysis Across PyTorch, JAX, and TensorFlow

A framework-neutral Python library that estimates a neural network's FLOPs and tensor traffic, measures its runtime, and uses a roofline model to tell you exactly where performance is being left on the table.

Post

I rebuilt this site so that publishing costs one file

The old site was a single 41,000-character index.html. Every change was archaeology. Here is what I replaced it with and why the constraint was maintenance, not design.

Post
↑ ↓ to navigate↵ to select
esc to close

Terminal