17

Blog | ASL Vowel Recognition using AlexNet | MATLAB Helper ®

 4 years ago
source link: https://matlabhelper.com/blog/matlab/american-sign-language-vowel-recognition-using-alexnet-matlab/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
ASL Vowel Recognition using AlexNet
Need Urgent Help?

Our experts assist in all MATLAB & Simulink fields with communication options from live sessions to offline work.

testimonials

Philippa E. / PhD Fellow

I STRONGLY recommend MATLAB Helper to EVERYONE interested in doing a successful project & research work! MATLAB Helper has completely surpassed my expectations. Just book their service and forget all your worries.

Yogesh Mangal / Graduate Trainee

MATLAB Helper provide training and internship in MATLAB. It covers many topics of MATLAB. I have received my training from MATLAB Helper with the best experience. It also provide many webinar which is helpful to learning in MATLAB.

Read another post

Among the deaf and vocally impaired community, sign language acts as a medium to know people, build relationships, understand technology, etc. The use of hands and face plays a primary role in this kind of community. There is no universal sign language. Different sign languages exist in various countries or regions. American Sign Language (ASL) is one of the most predominantly used sign languages in the world. Unlike the hand gestures used in the vocal community to augment speech, the hand gestures in sign language have a predefined highly formalized norm for each sign. Exactly as how spoken language has a vocabulary of words, sign language has a vocabulary of gestures. This allows the construction of sign-language dictionaries. Each sign of the language is equated to one or more words in a spoken language.  

Our objective is to use ASL alphabets, also known as the American Manual Alphabet (AMA) data, and build a recognition system capable of classifying the given ASL data into spoken language. 

You will learn to build a deep learning model capable of recognizing these alphabets using AlexNet in the coming sections. 

Input Data

The data set is a collection of alphabet images from A-Z from the American Sign Language, downloaded from Kaggle.com. The links to download the data are provided below. 

The training data set contains images that are 200x200 pixels. We will be using only the vowel data set for our task that is A, E, I, O, and U. The hand gestures for vowels are as shown below.

Source: Google

Each alphabet consisted of about 3000 images used for training the neural network. A relatively new function, ImageDatastore, was used to import this data into MATLAB. The advantage of using this function is it enables you to import or manage a collection of image files in batches that are too large to fit in memory.

Resizing Image 

Resizing an image is a part of image interpolation wherein you resize an image from the one-pixel grid to another without losing image quality. Interpolation works by using the known data to estimate values at unknown points.   

When you need to increase or decrease the total number of pixels in an image, the concept of image resizing comes into the picture. In MATLAB, we use the imresize function to do the following.   

As mentioned earlier, we are using an AlexNet designed for images of size 227x227x3. Hence, it would be ideal if the training images are of the same dimensions while using the network. 

MH Quiz Contest - Dec'20

Online MCQ Quiz on Machine Learning & MATLAB

Special Prize applicable till 31st December 2020. Hurry up!

AlexNet 

We will be using a deep neural network named AlexNet to recognize the vowel shown by sign language. To know what a deep neural network is and how it works, check our Blog of Object Recognition Using MATLAB.

AlexNet is the most commonly used Convolution Neural Network (CNN) for object recognition. The architecture consists of 5 convolutional layers, 3 max-pooling layers, 2 normalization layers, 2 fully connected layers, and 1 SoftMax layer. The network overall has 60 million parameters.  

AlexNet is a neural network, already trained on a million images. Hence, directly can be used for testing. But in our case, we are going to fine-tune a pre-trained AlexNet convolutional neural network to perform classification on a new collection of images. Let us see the steps in doing this,  

  • First, we begin with loading the pre-trained AlexNet neural network.  
  • The last three layers of the pre-trained network are configured for 1000 classes. But, for our classification problem, the 23rd and the 25th layer must be fine-tuned. Extract all layers, and then replace the following layers from the pre-trained network.  
  • The 23rd layer with a fully connected layer, and the 25th layer with the classification output layer. Set the fully connected layer to have the same size as the number of classes in the new data.  
  • Specify the training options. For transfer learning, keep the features from the early layers of the pre-trained network. Also, you do not need to train for as many epochs. Specify the mini-batch size and initial learn rate.  
  • Train the network using the transferred and new layers.  
  • Finally, save the trained network.   

Source: MathWorks

Requirements 

You can use AlexNet to classify objects in any image. In this example, we'll use it to identify the sign language images saved in the ImageDatastore object. In addition to MATLAB, we'll be using the following: 

  • Deep Learning Toolbox 
  • Support package for using AlexNet 

MATLAB Code 

Let us now see how to call the saved net in MATLAB and also how the trained net is classifying the test data.  

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Author: Kadeeja Tamanna
%Topic: American Sign Language Vowel Recognition using AlexNet in MATLAB
%Company: MATLAB Helper
%Website: https://MATLABHelper.com
%Date : 12-05-2020
%This script will load the trained AlexNet and recognize or classify the
%American sign language vowel data
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%clearing the command window and work space and closing all the windows
clc;
clear;
close all;
%% AlexNet
%loading the pre-trained AlexNet
load myNet1;
%% Test data
%Reading the data and resizing it
test_data=imread('A_test.jpg');
test_input=imresize(test_data,[227,227]);
%% Classification
%classifying the given input image and assigning the label
label=classify(myNet1,test_input);
%%
%displaying the input image with the classified label
imshow(test_data);
title(label);

Output

Conclusion 

In this blog, we have presented a system that is capable of recognizing vowels in ASL. The code worked perfectly without any errors for all the test data. This task can be extended to wide-ranging applications using the ASL data, some of which are for you to try.  

  • American Sign Language alphabet Recognition using AlexNet in MATLAB.  
  • American Sign Language number Recognition using AlexNet in MATLAB.  
  • Build a system capable of converting a complete sentence word by word using AlexNet in MATLAB.  

Loved the Blog? Gives us your valuable feedback through comments!

Thank you for reading this blog. Do share this blog, if you found it helpful. If you have any query, post it in the comments or get in touch with us by emailing your questions to [email protected]. Follow us on LinkedInFacebook and Subscribe to our YouTube Channel. We have expanded the traditional classroom teaching to meet the needs of today's learners. Our experts assist in all MATLAB & Simulink fields with communication options from live sessions to offline work with Pricing suitable for everyone. You can get offline help via email or opt for online zoom meetings with one-click content sharing, real-time co-annotation, and digital whiteboard.

If you are looking for one-time expert help, you can go ahead with Pay As You Go Plan. If your task is research-oriented like thesis support or paper implementation and you have a proper timeline, our recommendation would be Research Assistance, a monthly plan with a steady reduction of 10% of the expert fee up to six months of subscription. We also offer Corporate Assistance for requirements with annual validity. The minimum expert booking time is 1 hour under the Pay As You Go plan. You can book 5/10/20 hours under the Research Assistance plan. You will get expert help for the time you book only after you have an active order.

If you are looking for an expert's help and ready for the paid service, share your requirement with necessary attachments & inform us about any Service preference along with the timeline. Once evaluated, we will revert back to you with more details and the next suggested step.

Education is our future. MATLAB is our feature. Happy MATLABing!


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK