Skip to content

PerlMonker303/machine-learning-asl

Repository files navigation

ASL Recognizer

Description

ASL (stands for "American Sign Language") is a widely used sign language for those requiring hearing and speaking aids. Similar to spoken languages, ASL also uses letters which one may express using one hand and no motion (except for letter Z).
Using my basic knowledge regarding Deep Learning I trained an Artifical Neural Network to smartly predict ASL signs based on an image input of a hand. The images are of size 28x28 and the data set was taken from here. The NN is made by hand and does not utilize any premade functions for traversing the layers besides the Adam Optimizer used to obtain the best parameters.

Results

So far I managed to obtain an accuracy of around 67% on the training data and 56% on the development set. Tweaking the regularization parameter, learning rate, number of layers or of hidden units might change these numbers slightly.

Concepts practiced

  • Multi-Class Classification Problem
  • Deep Neural Network
  • Multinomial Logistic Regression
  • Batch and Mini-Batch Gradient Descent
  • Adaptive Moment Estimation (Adam) Optimization
  • Feature Scaling with Mean Normalization and Standard Deviation
  • Gradient Checking
  • L2 Regularization
  • He Initialization
  • Decaying Learning Rate
  • Softmax Layer

Problems I faced

  • Vanishing Gradients - my gradients were going to 0 in the back propagation step although I was using the ReLU function for a better performance. I fixed it by scaling the features using the mean normalization and the standard deviation scaling technique
  • Cost is NaN - simply decreased the learning rate to fix this as a high learning rate might overshoot and fail to minimize
  • Gradient Descent not minimizing the cost - after 8-10 iterations the cost would start increasing. To fix this I had to find a smaller learning rate that would fit the optimizer nicely

How to run on your machine and test your own images?

  1. In the root directory create a directory called "data"
  2. Inside of it extract the data from the Kaggle link above (in the description)
  3. Delete everything that is extracted except the two .csv files (sign_mnist_data.csv and sign_mnist_test.csv)
  4. Create another directory inside "data" called "custom"
  5. Paste here all the images you want to test yourself - name them in the following manner: "cust_id.jpg" where id will be the index of the image (starting from 1)
  6. In the "main.py" module change the variable "m_custom" to be equal to the number of custom images you want to run your algorithm on (your own images)
  7. Run the "main.py" module, wait for the training and at the end you will see in the console your predictions one after the other

About

Artificial Neural Network for recognizing ASL signs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages