Deep learning for sign language recognition

May 26, 2020

I’m taking Coursera’s Deep Learning Specialization (https://www.coursera.org/specializations/deep-learning) to solidify my deep learning knowledge.

I strongly believe the best way to learn something is to put it into practice. So after the course Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization, I did my own exercise to sharpen my skills.

In the course, the programming assignment was to implement a deep neural network model to recognize numbers from 0 to 5 in sign language. Whereas, in this exercise I adapted the model to recognize 24 classes of letters (excluding J and Z) in American Sign Language.

The dataset is obtained from Kaggle (https://www.kaggle.com/datamunge/sign-language-mnist). The training data has 27,455 examples and the test data has 7172 examples. Each example is a 28×28=784 pixel vector with grayscale values between 0-255.

An illustration of the sign language is shown here (image courtesy of Kaggle):

Grayscale images with (0-255) pixel values:

One example in the MNIST dataset:

Deep Learning Model

In this exercise, I keep the same network architecture as the one used in the course. The model is as follows LINEAR -> RELU -> LINEAR -> RELU -> LINEAR -> SOFTMAX.

So there are two hidden layers and one output layer. The architecture is depicted below:

The neural network is implemented in Python and Tensorflow 1.x

The default hyperparameter values are learning_rate = 0.0001, num_epochs = 1500, minibatch_size = 32.

This is the result:

Train Accuracy: 1.0
Test Accuracy: 0.61503065

The model is clearly overfitting. Adding regularization methods such as L2 regularization or dropout can help reduce overfitting, but that’s out of the scope of this exercise. Please stay tuned as more to come.

This is obviously a simple neural network, but it’s a great introduction to Tensorflow. I’ve also learned many other things from the Coursera course, thanks to the brilliant teaching of Professor Andrew Ng.

The full source code can be found at https://github.com/minhthangdang/SignLanguageRecognition

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments