0% found this document useful (0 votes)
56 views

ISL Using Machine Learning

Uploaded by

mouli mudhiraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

ISL Using Machine Learning

Uploaded by

mouli mudhiraj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 95

A PROJECT REPORT

ON

An Efficient Approach For Interpretation of Indian


Sign Language Using Machine Learning
A Project submitted to

Jawaharlal Nehru Technological University Anantapur, Anantapuramu


In partial fulfillment of the requirements for
the award of the degree of

BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE & ENGINEERING

Submitted by

M. BHAGYA LAKSHMI 194C1A0598


N. BHAVYA SREE 194C1A05B4
K. NALINI 194C1A0578
K. GOPIKA 194C1A0584
K. MOUNIKA 194C1A0586

Under the esteemed guidance of


Mr. T. KATAIAH, M.Tech,
Assistant Professor
Department of CSE

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

SREE RAMA ENGINEERING COLLEGE


(Affiliated to JNTUA, Anantapuramu and approved by AICTE, New Delhi)
An ISO 9001:2015 & ISO 14001:2015 certified Institution
Rami Reddy Nagar, Karakambadi Road, Tirupathi-517507,A.P
2019 -2023
An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

An Efficient Approach For Interpretation of Indian


Sign Language Using Machine Learning
A Project submitted to

Jawaharlal Nehru Technological University Anantapur, Anantapuramu


In partial fulfillment of the requirements for
the award of the degree of

BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE & ENGINEERING

Submitted by

M. BHAGYA LAKSHMI 194C1A0598


N. BHAVYA SREE 194C1A05B4
K. NALINI 194C1A0578
K. GOPIKA 194C1A0584
K. MOUNIKA 194C1A0586

Under the esteemed guidance of


Mr. T. KATAIAH, M.Tech,
Assistant Professor
Department of CSE

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

SREE RAMA ENGINEERING COLLEGE


(Affiliated to JNTUA, Anantapuramu and approved by AICTE, New Delhi)
An ISO 9001:2015 & ISO 14001:2015 certified Institution
Rami Reddy Nagar, Karakambadi Road,Tirupathi-517507,A.P
2019 -2023

Department of CSE, SRET Group Of Institutions Page | 2


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Certificate
This is to certify that a Project entitled

An Efficient Approach For Interpretation of


Indian Sign Language Using Machine Learning
Is the bonafide work done by

M. BHAGYA LAKSHMI 194C1A0598


N. BHAVYA SREE 194C1A05B4
K. NALINI 194C1A0578
K. GOPIKA 194C1A0584
K. MOUNIKA 194C1A0586

In the Department of Computer Science & Engineering, SREE RAMA ENGINEERING


COLLEGE, Tirupati and is submitted to Jawaharlal Nehru Technological University Anantapur,
Anantapuramu in partial fulfillment of the requirements for the award of the degree of Computer
Science & Engineering.

This work has been carried out under the guidance of

Head of the Department Guide


Dr K.SRIHARI, M.Tech., (Ph.D) Mr. T. KATAIAH, M.Tech.,
Professor & HOD, Assistant Professor,
Department of CSE, Department of CSE,
SREE RAMA ENGINEERING COLLEGE SREE RAMA ENGINEERING COLLEGE
Tirupathi. Tirupathi.

Viva- Voce held on …………………………………………………..

Department of CSE, SRET Group Of Institutions Page | 3


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

INTERNAL EXAMINER EXTERNAL EXAMINER


ACKNOWLEDGEMENT

We consider it is our privilege to express our gratitude and respect to all those who guided, inspired
and helped us in the completion of an Project.

We are thankful to our chairman Sri MANNEM RAMI REDDY, Director Sri MANNEM
ARAVIND KUMAR REDDY and Principal Dr.K. JAYACHANDRA for permitting us to use
facilities available in this college to accomplish the Project completely.

We express our deep sense of gratitude to Mr G. LAKSHMIKANTH, Head of the department of


CSE for his kind help that he extended at every stage of our work for all provisions made us to
complete this endeavors successfully.

We are thankful to our guide Mr T. KATAIAH, all of his guidance and co- operation of Project
work.

We are also thankful to all our staff members of Computer Science and Engineering for their
cooperation.
Last but not least, we wish to thank to all my friends, and who helped directly or indirectly in
completion of our Project.

Department of CSE, SRET Group Of Institutions Page | 4


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

ABSTRACT

Non-verbal communication involves the usage of Sign


Language. The sign language is used by people with hearing /
speech disabilities to express their thoughts and feelings. But
normally, people find it difficult to understand the hand
gestures of the specially challenged people as they do not
know the meaning of the sign language gestures. Usually, a
translator is needed when a speech / hearing impaired person
wants to communicate with an ordinary person and vice versa.
In order to enable the specially challenged people to
effectively communicate with the people around them, a
system that translates the Indian Sign Language (ISL) hand
gestures of numbers (1-9), English alphabets (A-Z) and a few
English words to understandable text and vice versa has been
proposed in this paper. This is done using image processing
techniques and Machine Learning algorithms. Different neural
network classifiers are developed, tested and validated for
their performance in gesture recognition and the most efficient
classifier is identified.

Department of CSE, SRET Group Of Institutions Page | 5


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

TABLE OF CONTENTS

S.NO CHAPTER TITLE PAGE


NO. NO.
1 1 Introduction 1
2 1.1 Introduction to Sign Language 2
3 2 System Analysis 4
4 2.1 Existing System 5
5 2.2 Proposed System 5
6 2.3 Literature Survey 7
7 2.4 Feasability Study 9
8 3 System Requirements 11
9 3.1 Hardware and Software Requirements 12
10 3.1.1 Requirement Analysis 12
11 3.1.2 Requirement Specification 12
12 3.2 Software Requirements 13
13 3.3 Hardware Requirements 13
14 4 System Design 14
15 4.1 System Architecture 15
16 4.2 Data Flow Diagram 15
17 4.3 UML Diagrams 16
18 4.3.1 Use Case Diagram 17

Department of CSE, SRET Group Of Institutions Page | 6


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

19 4.3.2 Class Diagram 17


20 4.3.3 Sequence Diagram 18
21 4.3.4 Active Diagram 19
22 4.4 Input And Output Design 19
23 4.4.1 Input Design 19
24 4.4.2 Output Design 20
25 5 Implementation 22
26 5.1 Modules 23
27 5.1.1 User 23
28 5.1.2 Admin 23
29 5.1.3 Data Pre-Processing 23
30 5.1.4 Deep Learning and Machine Learning 23
31 5.2 Software Environment 24
32 5.2.1 Python 24
33 5.2.2 Django 39
34 6 Testing 50
35 6.1 Testing 51
36 6.2 Types of Testing 51
37 6.2.1 Unit Testing 51
38 6.2.2 Integration Testing 51
39 6.2.3 Functional Testing 51
40 6.2.4 System Test 52
41 6.3 Test Strategy and Approach 52
42 6.3.1 Integration Testing 53
43 6.3.2 Acceptance Testing 53
44 7 Source Code 54
45 8 Result 72
46 8.1 Sample Test cases 73
47 8.2 Screen Shots 74

Department of CSE, SRET Group Of Institutions Page | 7


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

LIST OF FIGURES

S.NO FIGURE NAME PAGE NO


NO

1 4.1 System Architecture 15

2 4.2 Data Flow Diagram 16

3 4.4 Use Case Diagram 17

4 4.5 Class Diagram 18

5 4.6 Sequence Diagram 18

6 4.7 Activity Diagram 19

7 8.2.1 Home Page 74

Department of CSE, SRET Group Of Institutions Page | 8


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

8 8.2.2 Registration 74

9 8.2.3 Admin Login Page 75

10 8.2.4 Admin Home Page 75

11 8.2.5 Activate User 76

12 8.2.6 User Login Page 76

13 8.2.7 User Home Page 77

14 8.2.8 Model Training 77

15 8.2.9 Sign Detection 78

16 8.2.10 Sign caption 78

17 8.2.11 Speech to Text 79

LIST OF TABLES

S.NO TABLE NO. NAME OF THE TABLE PAGE NO.

1 7.1 Sample Test Cases 73

Department of CSE, SRET Group Of Institutions Page | 9


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Department of CSE, SRET Group Of Institutions Page | 10


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-1
INTRODUCTION

1.1 INTRODUCTION

Sign Languages vary throughout the world. There are around 300 different sign languages used

across various parts of the world. This is because sign languages were developed naturally by people

belonging to different ethnic groups. Perhaps, India does not have a standard sign language. Lexical

variations and different dialects of Indian Sign Language are found in different parts of India. But,

recently, efforts had been taken to standardize the Indian Sign Language (ISL). The ISL hand

gestures are divided into two broad categories: (i) static gestures, and (ii) dynamic gestures. The

static ISL hand gestures of numbers (0-9), English alphabets (A-Z), and some English words are

shown in Fig. 1. According to the 2011 census, there are around 50 lakh people in India with

Department of CSE, SRET Group Of Institutions Page | 11


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

speech/hearing impairments. But, there are only less than 300 educated and trained sign language

interpreters in India. So, people with speech/hearing impairments tend to become isolated and

lonely, as they face difficulties in communicating with other normal people. This has a tremendous

effect on both their social and working life. Due to the above mentioned challenges that the specially

challenged people face, an automated real-time system that could translate English words to ISL and

vice versa has been proposed in this paper. This system makes it easy for the specially challenged

people to communicate effectively with the rest of the world. This could enhance their abilities and

make them realize that they can do better in life. The proposed system performs two major tasks: (i)

Gesture to Text conversion and (ii) Speech to Gesture conversion. Gesture to text conversion is done

using neural network classifiers. Speech to gesture conversion is done using Google Speech

Recognition API. This paper focuses on conversion of standard Indian Sign Language gestures to

English, and conversion of English words (spoken) to Indian Sign Language gestures with highest

possible accuracy. For this, different neural network classifiers are developed, and their performance

in gesture recognition is tested. The most accurate and efficient classifier is chosen and is used to

develop an application that converts ISL gestures to their corresponding English text, and speech to

the corresponding ISL gestures.

Department of CSE, SRET Group Of Institutions Page | 12


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-2
SYSTEM ANALYSIS

Department of CSE, SRET Group Of Institutions Page | 13


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

2.1 EXISTING SYSTEM:

According to the 2011 census, there are around 50 lakh people in India with speech/hearing
impairments. But, there are only less than 300 educated and trained sign language interpreters in
India. So, people with speech/hearing impairments tend to become isolated and lonely, as they
face difficulties in communicating with other normal people. This has a tremendous effect on
both their social and working life. Due to the above mentioned challenges that the specially
challenged people face, an automated real-time system that could translate English words to ISL
and vice versa has been proposed in this paper. This system makes it easy for the specially
challenged people to communicate effectively with the rest of the world. This could enhance their
abilities and make them realize that they can do better in life.

DISADVANTAGES OF EXISTING SYSTEM:

 But, recently, efforts had been taken to standardize the Indian Sign Language (ISL). The ISL
hand gestures are divided into two broad categories: (i) static gestures, and (ii) dynamic
gestures. But the sign are not showing correct results due to small dataset .
 Algorithm: cnn

2.2 PROPOSED SYSTEM:

Department of CSE, SRET Group Of Institutions Page | 14


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

As mentioned in the above section, the proposed system for ISL interpretation performs two
major tasks: (i) Gesture to Text conversion and (ii) Speech to Gesture conversion. Gesture to text
conversion involves four major steps: (i) Dataset collection, (ii) Segmentation, (iii) Feature
Extraction and (iv) Classification. The concept diagram of gesture to text conversion is given in
conversion is dataset collection. An image dataset consisting of ISL hand gestures of 9 numbers
(1-9), 26 English alphabets and a few English words is collected. After the dataset is ready, all
the images in the dataset are pre-processed to mask the unwanted areas and to remove noise from
the image. Hence, pre-processing the images prior to feeding them to a classifier improves the
efficiency, accuracy and performance of the system. Hence, this step is very important in the
image classification process. Here, feature extraction is done using the Speeded-Up Robust
Feature (SURF) method. The SURF is used as a feature descriptor or as a feature detector. It is
often used for applications like object detection, image classification etc. It is a fast and robust
algorithm for representing and comparing images. It acts as a blob detector in an image. The
SURF features are calculated by finding the interest points in the image that contain the
meaningful features using the determinants of Hessian matrices. For each interest point found in
the previous process, the scale invariant descriptors are constructed.

ADVANTAGES OF PROPOSED SYSTEM:

 1) Resizing the images to the same size (for uniformity)


 2) Conversion of RGB image to Grayscale image
 3) Median Blur
 4) Skin Masking and Skin Detection
 5) Canny Edge Detection (to detect sharp edges in the image)
 Algorithm: Indian Sign Language, hand gestures, interpreter, SURF, Convolutional Neural
Network, Recurrent Neural Network, K-means clustering, Support Vector Machine

Department of CSE, SRET Group Of Institutions Page | 15


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

2.3 LITERATURE SURVEY

1) A Mobile Application of American Sign Language Translation via Image


Processing Algorithms

Due to the relative lack of pervasive sign language usage within our society, deaf and other
verbally-challenged people tend to face difficulty in communicating on a daily basis. Our study
thus aims to provide research into a sign language translator applied on the smartphone platform,
due to its portability and ease of use. In this paper, a novel framework comprising established
image processing techniques is proposed to recognise images of several sign language gestures.
More specifically, we initially implement Canny edge detection and seeded region growing to
segment the hand gesture from its background. Feature points are then extracted with Speeded
Up Robust Features (SURF) algorithm, whose features are derived through Bag of Features
(BoF). Support Vector Machine (SVM) is subsequently applied to classify our gesture image
dataset; where the trained dataset is used to recognize future sign language gesture inputs. The
proposed framework has been successfully implemented on smartphone platforms, and
experimental results show that it is able to recognize and translate 16 different American Sign
Language gestures with an overall accuracy of 97.13%.

2) Hand Gesture Recognition Software based on ISL.

Hand gestures are a powerful environment for communicating with communities with intellectual
disability. It is useful for connecting people and computers. The expansion potential of this
system can be known in public places where deaf people are communicating with ordinary
people to send messages. In this article, we have provided a system of recognizing gestures
continuously with the Indian Sign Language (ISL), which both hands are used to make every
gesture. Gesture recognition continues to be a daunting task. We tried to fix this problem using
the key download method. These key tips are useful for breaking down the sign language
gestures into the order of the characters, as well as deleting unsupported frameworks. After the
splitting gear breaks each character is regarded as a single and unique gesture. Pre-processing
gestures are obtained using histogram (OH) with PCA to reduce the dimensions of the traits
obtained after OH. The experiments were performed on our live ISL dataset, which was created
using an existing camera.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 16


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

3)” Real-time Indian Sign Language (ISL) Recognition

This paper presents a system which can recognise hand poses & gestures from the Indian Sign
Language (ISL) in real-time using grid-based features. This system attempts to bridge the
communication gap between the hearing and speech impaired and the rest of the society. The
existing solutions either provide relatively low accuracy or do not work in real-time. This system
provides good results on both the parameters. It can identify 33 hand poses and some gestures
from the ISL. Sign Language is captured from a smartphone camera and its frames are
transmitted to a remote server for processing. The use of any external hardware (such as gloves
or the Microsoft Kinect sensor) is avoided, making it user-friendly. Techniques such as Face
detection, Object stabilisation and Skin Colour Segmentation are used for hand detection and
tracking. The image is further subjected to a Grid-based Feature Extraction technique which
represents the hand's pose in the form of a Feature Vector. Hand poses are then classified using
the k-Nearest Neighbours algorithm. On the other hand, for gesture classification, the motion and
intermediate hand poses observation sequences are fed to Hidden Markov Model chains
corresponding to the 12 pre-selected gestures defined in ISL. Using this methodology, the system
is able to achieve an accuracy of 99.7% for static hand poses, and an accuracy of 97.23% for
gesture recognition.

4) A depth based ISL Recognition using Microsoft Kinect”

Recognition of sign language by a system has become important to bridge the communication
gap between the abled and the Hearing and Speech Impaired people. This paper introduces an
efficient algorithm for translating the input hand gesture in Indian Sign Language (ISL) into
meaningful English text and speech. The system captures hand gestures through Microsoft
Kinect (preferred as the system performance is unaffected by the surrounding light conditions
and object colour). The dataset used consists of depth and RGB images (taken using Kinect Xbox
360) with 140 unique gestures of the ISL taken from 21 subjects, which includes singlehanded
signs, double-handed signs and fingerspelling (signs for alphabets and numbers), totaling to 4600
images. To recognize the hand posture, the hand region is accurately segmented and hand
features are extracted using Speeded Up Robust Features, Histogram of Oriented Gradients and
Local Binary Patterns. The system ensembles the three feature classifiers trained using Support
Vector Machine to improve the average recognition accuracy up to 71.85%. The system then

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 17


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

translates the sequence of hand gestures recognized into the best approximate meaningful
English sentences. We achieved 100% accuracy for the signs representing 9, A, F, G, H, N and P.

5) Real time Recognition of ISL


This paper presents a system which can recognise hand poses & gestures from the Indian Sign
Language (ISL) in real-time using grid-based features. This system attempts to bridge the
communication gap between the hearing and speech impaired and the rest of the society. The
existing solutions either provide relatively low accuracy or do not work in real-time. This system
provides good results on both the parameters. It can identify 33 hand poses and some gestures from
the ISL. Sign Language is captured from a smartphone camera and its frames are transmitted to a
remote server for processing. The use of any external hardware (such as gloves or the Microsoft
Kinect sensor) is avoided, making it user-friendly. Techniques such as Face detection, Object
stabilisation and Skin Colour Segmentation are used for hand detection and tracking. The image is
further subjected to a Grid-based Feature Extraction technique which represents the hand's pose in
the form of a Feature Vector. Hand poses are then classified using the k-Nearest Neighbours
algorithm. On the other hand, for gesture classification, the motion and intermediate hand poses
observation sequences are fed to Hidden Markov Model chains corresponding to the 12 pre-selected
gestures defined in ISL. Using this methodology, the system is able to achieve an accuracy of 99.7%
for static hand poses, and an accuracy of 97.23% for gesture recognition.

2.4 FEASIBILITY STUDY

The feasibility of the project is analyzed in this phase and business proposal is put
forth with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.
Three key considerations involved in the feasibility analysis are,

 Economical Feasibility
 Technical Feasibility
 Social Feasibility
ECONOMICAL FEASIBILITY

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 18


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.

TECHNICAL FEASIBILITY

This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on the available
technical resources. This will lead to high demands on the available technical resources. This will
lead to high demands being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing this system.

SOCIAL FEASIBILITY

The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity. The level of acceptance by the
users solely depends on the methods that are employed to educate the user about the system and
to make him familiar with it. His level of confidence must be raised so that he is also able to
make some constructive criticism, which is welcomed, as he is the final user of the system.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 19


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-3
SYSTEM REQUIREMENTS

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 20


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

3.1 HARDWARE AND SOFTWARE REQUIREMENTS

3.1.1 REQUIREMENT ANALYSIS

The project involved analyzing the design of few applications so as to make the application
more users friendly. To do so, it was really important to keep the navigations from one screen
to the other well ordered and at the same time reducing the amount of typing the user needs to
do. In order to make the application more accessible, the browser version had to be chosen so
that it is compatible with most of the Browsers.

3.1.2 REQUIREMENT SPECIFICATION

Functional Requirements

 Graphical User interface with the User.


Software Requirements

For developing the application the following are the Software Requirements:

1. Python

2. Django

Operating Systems supported

1. Windows 10 64 bit OS

Technologies and Languages used to Develop

1. Python

Debugger and Emulator

 Any Browser (Particularly Chrome)


Hardware Requirements

For developing the application the following are the Hardware Requirements:

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 21


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

 Processor: Intel i9
 RAM: 32 GB
 Space on Hard Disk: minimum 1 TB

3.2 HARDWARE REQUIREMENTS:

 System : Intel i3

 Hard Disk : 1 TB.

 Monitor : 14’ Colour Monitor.

 Mouse : Optical Mouse.

 Ram : 4GB.

3.3 SOFTWARE REQUIREMENTS:

 Operating system : Windows 10.

 Coding Language : Python.

 Front-End : Html. CSS

 Designing : Html,css,javascript.

 Data Base : SQLite.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 22


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-4
SYSTEM DESIGN

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 23


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

4.1 SYSTEM ARCHITECTURE:

Fig:4.1 System Architecture

4.2 DATA FLOW DIAGRAM:

1. The DFD is also called as bubble chart. It is a simple graphical formalism that can be used to
represent a system in terms of input data to the system, various processing carried out on this
data, and the output data is genBerated by this system.
2. The data flow diagram (DFD) is one of the most important modeling tools. It is used to model
the system components. These components are the system process, the data used by the
process, an external entity that interacts with the system and the information flows in the
system.
3. DFD shows how the information moves through the system and how it is modified by a series
of transformations. It is a graphical technique that depicts information flow and the
transformations that are applied as data moves from input to output.
4. DFD is also known as bubble chart. A DFD may be used to represent a system at any level of
abstraction. DFD may be partitioned into levels that represent increasing information flow
and functional detail.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 24


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Fig:4.2 Data Flow Diagram

4.3 UML DIAGRAMS

UML stands for Unified Modeling Language. UML is a standardized general-purpose modeling
language in the field of object-oriented software engineering. The standard is managed, and was
created by, the Object Management Group.
The goal is for UML to become a common language for creating models of object oriented
computer software. In its current form UML is comprised of two major components: a Meta-model
and a notation. In the future, some form of method or process may also be added to; or associated
with, UML.
The Unified Modeling Language is a standard language for specifying, Visualization,
Constructing and documenting the artifacts of software system, as well as for business modeling and
other non-software systems.
The UML represents a collection of best engineering practices that have proven successful in
the modeling of large and complex systems.
The UML is a very important part of developing objects oriented software and the software
development process. The UML uses mostly graphical notations to express the design of software
projects.

GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide users a ready-to-use, expressive visual modeling Language so that they can develop
and exchange meaningful models.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 25


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

2. Provide extendibility and specialization mechanisms to extend the core concepts.


3. Be independent of particular programming languages and development process.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations, frameworks, patterns and
components.
7. Integrate best practices.

4.3.1 USE CASE DIAGRAM:

A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented as
use cases), and any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actor. Roles of the actors in
the system can be depicted.

Fig:4.3.1 Use Case Diagram

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 26


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

4.3.2 CLASS DIAGRAM:

In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of
static structure diagram that describes the structure of a system by showing the system's classes,
their attributes, operations (or methods), and the relationships among the classes. It explains
which class contains information.

Fig:4.3.2 Class Diagram

4.3.3 SEQUENCE DIAGRAM:

A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that
shows how processes operate with one another and in what order. It is a construct of a Message
Sequence Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 27


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

timing.

Fig:4.3.3 Sequence Diagram

4.3.4 ACTIVITY DIAGRAM:

Activity diagrams are graphical representations of workflows of stepwise activities and actions
with support for choice, iteration and concurrency. In the Unified Modeling Language, activity
diagrams can be used to describe the business and operational step-by-step workflows of
components in a system. An activity diagram shows the overall flow of control.

Fig:4.3.4 Activity Diagram

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 28


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

4.4 INPUT AND OUTPUT DESIGN

4.4.1 INPUT DESIGN

The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and those steps are
necessary to put transaction data in to a usable form for processing can be achieved by inspecting
the computer to read data from a written or printed document or it can occur by having people
keying the data directly into the system. The design of input focuses on controlling the amount of
input required, controlling the errors, avoiding delay, avoiding extra steps and keeping the
process simple. The input is designed in such a way so that it provides security and ease of use
with retaining the privacy. Input Design considered the following things:

 What data should be given as input?


 How the data should be arranged or coded?
 The dialog to guide the operating personnel in providing input.
 Methods for preparing input validations and steps to follow when error occur.

OBJECTIVES

1.Input Design is the process of converting a user-oriented description of the input into a
computer-based system. This design is important to avoid errors in the data input process and
show the correct direction to the management for getting correct information from the
computerized system.

2. It is achieved by creating user-friendly screens for the data entry to handle large volume of
data. The goal of designing input is to make data entry easier and to be free from errors. The data
entry screen is designed in such a way that all the data manipulates can be performed. It also
provides record viewing facilities.

3.When the data is entered it will check for its validity. Data can be entered with the help of
screens. Appropriate messages are provided as when needed so that the user will not be in maize
of instant. Thus the objective of input design is to create an input layout that is easy to follow

4.4.2 OUTPUT DESIGN

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 29


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

A quality output is one, which meets the requirements of the end user and presents
the information clearly. In any system results of processing are communicated to the users and to
other system through outputs. In output design it is determined how the information is to be
displaced for immediate need and also the hard copy output. It is the most important and direct
source information to the user. Efficient and intelligent output design improves the system’s
relationship to help user decision-making.

1. Designing computer output should proceed in an organized, well thought out


manner; the right output must be developed while ensuring that each output element is designed
so that people will find the system can use easily and effectively. When analysis design computer
output, they should Identify the specific output that is needed to meet the requirements.

2.Select methods for presenting information.

3.Create document, report, or other formats that contain information produced by


the system.

The output form of an information system should accomplish one or more of the
following objectives.

 Convey information about past activities, current status or projections of the


 Future.
 Signal important events, opportunities, problems, or warnings.
 Trigger an action.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 30


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-5
IMPLEMENTATION

5.1 MODULES:

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 31


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

 User
 Admin
 Data Preprocessing
 Deep learning and machine learning

MODULES DESCRIPTION:
5.1.1 User:
The User can register the first. While registering he required a valid user email and mobile for
further communications. Once the user register then admin can activate the user. Once admin
activated the user then us
er can login into our system. User can upload the dataset based on our dataset column matched.
For algorithm execution data must be in float format. Here we took sign language dataset. User
can also add the new data for existing dataset based on our Django application. User can click the
Classification in the web page so that the data calculated Accuracy, Loss based on the
algorithms.
5.1.2 Admin:
Admin can login with his login details. Admin can activate the registered users. Once he activate
then only the user can login into our system. Admin can view the overall data in the browser.
Admin can click the Results in the web page so calculated Accuracy, loss based on the
algorithms is displayed. All algorithms execution complete then admin can see the overall
accuracy in web page.
5.1.3 Data Pre-processing:
The images in the dataset were pre-processed to mask unwanted areas in the image and to
remove noise as mentioned in the previous section. The various image pre-processing steps
performed on a sample image from the dataset. The SURF feature matrix was calculated for
every image in the dataset after pre-processing them. The SURF features extracted for a sample
image. The blue colored circles of varying sizes found in the SURF Feature points. The SURF
features of all the images were extracted and stored in a pickle file and then fed into different
neural network classifiers. The accuracy of each of the classifiers tested.
5.1.4 Deep learning and machine learning:
Based on the split criterion, the cleansed data is split into 60% training and 40% test. The Support
Vector Machine: The input images were passed to the K-means clustering and Bag of Visual

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 32


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

words classifiers before passing them to the SVM classifier. As there are 42 classes of images in
the dataset, k=42 for the Kmeans clustering classifier. The visual words were collected for both
the test and train dataset after applying the k-means clustering algorithm. There are totally 50391
images in the dataset. Among these images, 40320 images were used for training the SVM
model. The remaining, 10071 images were used for testing the performance of the classifier
model. A testing accuracy of around 99.5% was achieved. The other performance metrics like
precision score, F1 score, and recall score were also calculated. The Convolutional Neural
Network: A Convolutional Neural Network was modeled and developed using the Keras library
in Python. Around 30,240 images (60% of the images in the dataset) were used to train the
classifier model. The classifier was trained with different number of epochs. A maximum
average testing accuracy of around 88.89% was obtained. 3) Recurrent Neural Network: A
Recurrent Neural Network was modeled and developed using the Keras library in Python.
Around 30,240 images were used to train the classifier model. The classifier was trained with
different number of epochs. A maximum overall testing accuracy of around 82.3% was obtained
5.2 SOFTWARE ENVIRONMENT

5.2.1 PYTHON

Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming


language. An interpreted language, Python has a design philosophy that emphasizes
code readability (notably using whitespace indentation to delimit code blocks rather than curly
brackets or keywords), and a syntax that allows programmers to express concepts in fewer lines
of code than might be used in languages such as C++or Java. It provides constructs that enable
clear programming on both small and large scales. Python interpreters are available for
many operating systems. CPython, the reference implementation of Python, is open
source software and has a community-based development model, as do nearly all of its variant
implementations. CPython is managed by the non-profit Python Software Foundation. Python
features a dynamic type system and automatic memory management. It supports
multiple programming paradigms, including object-
oriented, imperative, functional and procedural, and has a large and comprehensive standard
library.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 33


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Interactive Mode Programming

Invoking the interpreter without passing a script file as a parameter brings up the following
prompt −

$ python

Python 2.4.3 (#1, Nov 11 2010, 13:34:43)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>

Type the following text at the Python prompt and press the Enter −

>>> print "Hello, Python!"

If you are running new version of Python, then you would need to use print statement with
parenthesis as in print ("Hello, Python!"); . However in Python version 2.4.3, this produces the
following result −

Hello, Python!

Script Mode Programming

Invoking the interpreter with a script parameter begins execution of the script and continues until
the script is finished. When the script is finished, the interpreter is no longer active.

Let us write a simple Python program in a script. Python files have extension .py. Type the
following source code in a test.py file –

Live Demo

print "Hello, Python!"

We assume that you have Python interpreter set in PATH variable. Now, try to run this program
as follows −

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 34


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

$ python test.py

This produces the following result –

Hello, Python!

Let us try another way to execute a Python script. Here is the modified test.py file −

Live Demo

#!/usr/bin/python

print "Hello, Python!"

We assume that you have Python interpreter available in /usr/bin directory. Now, try to run this
program as follows −

$ chmod +x test.py # This is to make file executable

$./test.py

This produces the following result −

Hello, Python!

Python Identifiers

A Python identifier is a name used to identify a variable, function, class, module or other object.
An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or more
letters, underscores and digits (0 to 9).

Python does not allow punctuation characters such as @, $, and % within identifiers. Python is a
case sensitive programming language. Thus, Manpower and manpower are two different
identifiers in Python.

Here are naming conventions for Python identifiers −

Class names start with an uppercase letter. All other identifiers start with a lowercase letter.

Starting an identifier with a single leading underscore indicates that the identifier is private.

Starting an identifier with two leading underscores indicates a strongly private identifier

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 35


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

If the identifier also ends with two trailing underscores, the identifier is a language-defined
special name.

Reserved Words

The following list shows the Python keywords. These are reserved words and you cannot use
them as constant or variable or any other identifier names. All the Python keywords contain
lowercase letters only.

and exec not

assert finally or

break for pass

class from print

continue global raise

def if return

del import try

elif in while

else is with

except lambdayield

Lines and Indentation

Python provides no braces to indicate blocks of code for class and function definitions or flow
control. Blocks of code are denoted by line indentation, which is rigidly enforced.

The number of spaces in the indentation is variable, but all statements within the block must be
indented the same amount. For example

if True:

print "True"

else:

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 36


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

print "False"

However, the following block generates an error −

if True:

print "Answer"

print "True"

else:

print "Answer"

print "False"

Thus, in Python all the continuous lines indented with same number of spaces would form a
block. The following example has various statement blocks −

Note − Do not try to understand the logic at this point of time. Just make sure you understood
various blocks even if they are without braces.

#!/usr/bin/python

import sys

try:

# open file stream

file = open(file_name, "w")

except IOError:

print "There was an error writing to", file_name

sys.exit()

print "Enter '", file_finish,

print "' When finished"

while file_text != file_finish:

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 37


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

file_text = raw_input("Enter text: ")

if file_text == file_finish:

# close the file

file.close

break

file.write(file_text)

file.write("\n")

file.close()

file_name = raw_input("Enter filename: ")

if len(file_name) == 0:

print "Next time please enter something"

sys.exit()

try:

file = open(file_name, "r")

except IOError:

print "There was an error reading file"

sys.exit()

file_text = file.read()

file.close()

print file_text

Multi-Line Statements

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 38


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Statements in Python typically end with a new line. Python does, however, allow the use of the
line continuation character (\) to denote that the line should continue. For example −

total = item_one + \

item_two + \

item_three

Statements contained within the [], {}, or () brackets do not need to use the line continuation
character. For example −

days = ['Monday', 'Tuesday', 'Wednesday',

'Thursday', 'Friday']

Quotation in Python

Python accepts single ('), double (") and triple (''' or """) quotes to denote string literals, as long as
the same type of quote starts and ends the string.

The triple quotes are used to span the string across multiple lines. For example, all the following
are legal −

word = 'word'

sentence = "This is a sentence."

paragraph = """This is a paragraph. It is

made up of multiple lines and sentences."""

Comments in Python

A hash sign (#) that is not inside a string literal begins a comment. All characters after the # and
up to the end of the physical line are part of the comment and the Python interpreter ignores
them.

Live Demo

#!/usr/bin/python

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 39


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

# First comment

print "Hello, Python!" # second comment

This produces the following result −

Hello, Python!

You can type a comment on the same line after a statement or expression −

name = "Madisetti" # This is again comment

You can comment multiple lines as follows −

# This is a comment.

# This is a comment, too.

# This is a comment, too.

# I said that already.

Following triple-quoted string is also ignored by Python interpreter and can be used as a
multiline comments:

'''

This is a multiline

comment.

'''

Using Blank Lines

A line containing only whitespace, possibly with a comment, is known as a blank line and Python
totally ignores it.

In an interactive interpreter session, you must enter an empty physical line to terminate a
multiline statement.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 40


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Waiting for the User

The following line of the program displays the prompt, the statement saying “Press the enter key
to exit”, and waits for the user to take action −

#!/usr/bin/python

raw_input("\n\nPress the enter key to exit.")

Here, "\n\n" is used to create two new lines before displaying the actual line. Once the user
presses the key, the program ends. This is a nice trick to keep a console window open until the
user is done with an application.

Multiple Statements on a Single Line

The semicolon ( ; ) allows multiple statements on the single line given that neither statement
starts a new code block. Here is a sample snip using the semicolon.

import sys; x = 'foo'; sys.stdout.write(x + '\n')

Multiple Statement Groups as Suites

A group of individual statements, which make a single code block are called suites in Python.
Compound or complex statements, such as if, while, def, and class require a header line and a
suite.

Header lines begin the statement (with the keyword) and terminate with a colon ( : ) and are
followed by one or more lines which make up the suite. For example −

if expression :

suite

elif expression :

suite

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 41


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

else :

suite

Command Line Arguments

Many programs can be run to provide you with some basic information about how they should be
run. Python enables you to do this with -h −

$ python -h

usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...

Options and arguments (and corresponding environment variables):

-c cmd : program passed in as string (terminates option list)

-d : debug output from parser (also PYTHONDEBUG=x)

-E : ignore environment variables (such as PYTHONPATH)

-h : print this help message and exit

You can also program your script in such a way that it should accept various options. Command
Line Arguments is an advanced topic and should be studied a bit later once you have gone
through rest of the Python concepts.

Python Lists

The list is a most versatile datatype available in Python which can be written as a list of comma-
separated values (items) between square brackets. Important thing about a list is that items in a
list need not be of the same type.

Creating a list is as simple as putting different comma-separated values between square brackets.
For example −

list1 = ['physics', 'chemistry', 1997, 2000];

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 42


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

list2 = [1, 2, 3, 4, 5 ];

list3 = ["a", "b", "c", "d"]

Similar to string indices, list indices start at 0, and lists can be sliced, concatenated and so on.

A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The
differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples use
parentheses, whereas lists use square brackets.

Creating a tuple is as simple as putting different comma-separated values. Optionally you can put
these comma-separated values between parentheses also. For example −

tup1 = ('physics', 'chemistry', 1997, 2000);

tup2 = (1, 2, 3, 4, 5 );

tup3 = "a", "b", "c", "d";

The empty tuple is written as two parentheses containing nothing −

tup1 = ();

To write a tuple containing a single value you have to include a comma, even though there is
only one value –

tup1 = (50,);

Like string indices, tuple indices start at 0, and they can be sliced, concatenated, and so on.

Accessing Values in Tuples

To access values in tuple, use the square brackets for slicing along with the index or indices to
obtain value available at that index. For example −

Live Demo

#!/usr/bin/python

tup1 = ('physics', 'chemistry', 1997, 2000);

tup2 = (1, 2, 3, 4, 5, 6, 7 );

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 43


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

print "tup1[0]: ", tup1[0];

print "tup2[1:5]: ", tup2[1:5];

When the above code is executed, it produces the following result −

tup1[0]: physics

tup2[1:5]: [2, 3, 4, 5]

Updating Tuples

Accessing Values in Dictionary

To access dictionary elements, you can use the familiar square brackets along with the key to
obtain its value. Following is a simple example

Live Demo

#!/usr/bin/python

dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}

print "dict['Name']: ", dict['Name']

print "dict['Age']: ", dict['Age']

When the above code is executed, it produces the following result −

dict['Name']: Zara

dict['Age']: 7

If we attempt to access a data item with a key, which is not part of the dictionary, we get an error
as follows −

Live Demo

#!/usr/bin/python

dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}

print "dict['Alice']: ", dict['Alice']

When the above code is executed, it produces the following result −

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 44


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

dict['Alice']:

Traceback (most recent call last):

File "test.py", line 4, in <module>

print "dict['Alice']: ", dict['Alice'];

KeyError: 'Alice'

Updating Dictionary

You can update a dictionary by adding a new entry or a key-value pair, modifying an existing
entry, or deleting an existing entry as shown below in the simple example −

Live Demo

#!/usr/bin/python

dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}

dict['Age'] = 8; # update existing entry

dict['School'] = "DPS School"; # Add new entry

print "dict['Age']: ", dict['Age']

print "dict['School']: ", dict['School']

When the above code is executed, it produces the following result −

dict['Age']: 8

dict['School']: DPS School

Delete Dictionary Elements

You can either remove individual dictionary elements or clear the entire contents of a dictionary.
You can also delete entire dictionary in a single operation.

To explicitly remove an entire dictionary, just use the del statement. Following is a simple
example

Live Demo

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 45


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

#!/usr/bin/python

dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}

del dict['Name']; # remove entry with key 'Name'

dict.clear() ; # remove all entries in dict

del dict ; # delete entire dictionary

print "dict['Age']: ", dict['Age']

print "dict['School']: ", dict['School']

This produces the following result. Note that an exception is raised because after del dict
dictionary does not exist any more −

dict['Age']:

Traceback (most recent call last):

File "test.py", line 8, in <module>

print "dict['Age']: ", dict['Age'];

TypeError: 'type' object is unsubscriptable

Note − del() method is discussed in subsequent section.

Properties of Dictionary Keys

Dictionary values have no restrictions. They can be any arbitrary Python object, either standard
objects or user-defined objects. However, same is not true for the keys.

There are two important points to remember about dictionary keys −

(a) More than one entry per key not allowed. Which means no duplicate key is allowed. When
duplicate keys encountered during assignment, the last assignment wins. For example −

Live Demo

#!/usr/bin/python

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 46


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

dict = {'Name': 'Zara', 'Age': 7, 'Name': 'Manni'}

print "dict['Name']: ", dict['Name']

When the above code is executed, it produces the following result −

dict['Name']: Manni

(b) Keys must be immutable. Which means you can use strings, numbers or tuples as dictionary
keys but something like ['key'] is not allowed. Following is a simple example −

Live Demo

#!/usr/bin/python

dict = {['Name']: 'Zara', 'Age': 7}

print "dict['Name']: ", dict['Name']

When the above code is executed, it produces the following result −

Traceback (most recent call last):

File "test.py", line 3, in <module>

dict = {['Name']: 'Zara', 'Age': 7};

TypeError: unhashable type: 'list'

Tuples are immutable which means you cannot update or change the values of tuple elements.
You are able to take portions of existing tuples to create new tuples as the following example
demonstrates −

Live Demo

#!/usr/bin/python

tup1 = (12, 34.56);

tup2 = ('abc', 'xyz');

# Following action is not valid for tuples

# tup1[0] = 100;

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 47


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

# So let's create a new tuple as follows

tup3 = tup1 + tup2;

print tup3;

When the above code is executed, it produces the following result −

(12, 34.56, 'abc', 'xyz')

Delete Tuple Elements

Removing individual tuple elements is not possible. There is, of course, nothing wrong with
putting together another tuple with the undesired elements discarded.

To explicitly remove an entire tuple, just use the del statement. For example −

Live Demo

#!/usr/bin/python

tup = ('physics', 'chemistry', 1997, 2000);

print tup;

del tup;

print "After deleting tup : ";

print tup;

This produces the following result. Note an exception raised, this is because after del tup tuple
does not exist any more −

('physics', 'chemistry', 1997, 2000)

After deleting tup :

Traceback (most recent call last):

File "test.py", line 9, in <module>

print tup;

NameError: name 'tup' is not defined

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 48


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

5.2.2 DJANGO

Django is a high-level Python Web framework that encourages rapid development and
clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of
Web development, so you can focus on writing your app without needing to reinvent the wheel.
It’s free and open source.

Django's primary goal is to ease the creation of complex, database-driven websites. Django
emphasizes reusability and "pluggability" of components, rapid development, and the principle
of don't repeat yourself. Python is used throughout, even for settings files and data models.

Django also provides an optional administrative create, read, update and delete interface that is
generated dynamically through introspection and configured via admin models

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 49


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Create a Project

Whether you are on Windows or Linux, just get a terminal or a cmd prompt and navigate to the
place you want your project to be created, then use this code −

$ django-admin startproject myproject

This will create a "myproject" folder with the following structure −

myproject/

manage.py

myproject/

__init__.py

settings.py

urls.py

wsgi.py

The Project Structure

The “myproject” folder is just your project container, it actually contains two elements −

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 50


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

manage.py − This file is kind of your project local django-admin for interacting with your project
via command line (start the development server, sync db...). To get a full list of command
accessible via manage.py you can use the code −

$ python manage.py help

The “myproject” subfolder − This folder is the actual python package of your project. It contains
four files −

__init__.py − Just for python, treat this folder as package.

settings.py − As the name indicates, your project settings.

urls.py − All links of your project and the function to call. A kind of ToC of your project.

wsgi.py − If you need to deploy your project over WSGI.

Setting Up Your Project

Your project is set up in the subfolder myproject/settings.py. Following are some important
options you might need to set −

DEBUG = True

This option lets you set if your project is in debug mode or not. Debug mode lets you get more
information about your project's error. Never set it to ‘True’ for a live project. However, this has
to be set to ‘True’ if you want the Django light server to serve static files. Do it only in the
development mode.

DATABASES = {

'default': {

'ENGINE': 'django.db.backends.sqlite3',

'NAME': 'database.sql',

'USER': '',

'PASSWORD': '',

'HOST': '',

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 51


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

'PORT': '',

Database is set in the ‘Database’ dictionary. The example above is for SQLite engine. As stated
earlier, Django also supports −

MySQL (django.db.backends.mysql)

PostGreSQL (django.db.backends.postgresql_psycopg2)

Oracle (django.db.backends.oracle) and NoSQL DB

MongoDB (django_mongodb_engine)

Before setting any new engine, make sure you have the correct db driver installed.

You can also set others options like: TIME_ZONE, LANGUAGE_CODE, TEMPLATE…

Now that your project is created and configured make sure it's working −

$ python manage.py runserver

You will get something like the following on running the above code −

Validating models...

0 errors found

September 03, 2015 - 11:41:50

Django version 1.6.11, using settings 'myproject.settings'

Starting development server at http://127.0.0.1:8000/

Quit the server with CONTROL-C.

A project is a sum of many applications. Every application has an objective and can be reused
into another project, like the contact form on a website can be an application, and can be reused
for others. See it as a module of your project.

Create an Application

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 52


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

We assume you are in your project folder. In our main “myproject” folder, the same folder then
manage.py −

$ python manage.py startapp myapp

You just created myapp application and like project, Django create a “myapp” folder with the
application structure −

myapp/

__init__.py

admin.py

models.py

tests.py

views.py

__init__.py − Just to make sure python handles this folder as a package.

admin.py − This file helps you make the app modifiable in the admin interface.

models.py − This is where all the application models are stored.

tests.py − This is where your unit tests are.

views.py − This is where your application views are.

Get the Project to Know About Your Application

At this stage we have our "myapp" application, now we need to register it with our Django
project "myproject". To do so, update INSTALLED_APPS tuple in the settings.py file of your
project (add your app name) −

INSTALLED_APPS = (

'django.contrib.admin',

'django.contrib.auth',

'django.contrib.contenttypes',

'django.contrib.sessions',

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 53


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

'django.contrib.messages',

'django.contrib.staticfiles',

'myapp',

Creating forms in Django, is really similar to creating a model. Here again, we just need to
inherit from Django class and the class attributes will be the form fields. Let's add a forms.py file
in myapp folder to contain our app forms. We will create a login form.

myapp/forms.py

#-*- coding: utf-8 -*-

from django import forms

class LoginForm(forms.Form):

user = forms.CharField(max_length = 100)

password = forms.CharField(widget = forms.PasswordInput())

As seen above, the field type can take "widget" argument for html rendering; in our case, we
want the password to be hidden, not displayed. Many others widget are present in Django:
DateInput for dates, CheckboxInput for checkboxes, etc.

Using Form in a View

There are two kinds of HTTP requests, GET and POST. In Django, the request object passed as
parameter to your view has an attribute called "method" where the type of the request is set, and
all data passed via POST can be accessed via the request.POST dictionary.

Let's create a login view in our myapp/views.py −

#-*- coding: utf-8 -*-

from myapp.forms import LoginForm

def login(request):

username = "not logged in"

if request.method == "POST":

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 54


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

#Get the posted form

MyLoginForm = LoginForm(request.POST)

if MyLoginForm.is_valid():

username = MyLoginForm.cleaned_data['username']

else:

MyLoginForm = Loginform()

return render(request, 'loggedin.html', {"username" : username})

The view will display the result of the login form posted through the loggedin.html. To test it, we
will first need the login form template. Let's call it login.html

<html>

<body>

<form name = "form" action = "{% url "myapp.views.login" %}"

method = "POST" > {% csrf_token %}

<div style = "max-width:470px;">

<center>

<input type = "text" style = "margin-left:20%;"

placeholder = "Identifiant" name = "username" />

</center>

</div>

<br>

<div style = "max-width:470px;">

<center>

<input type = "password" style = "margin-left:20%;"

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 55


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

placeholder = "password" name = "password" />

</center>

</div>

<br>

<div style = "max-width:470px;">

<center>

<button style = "border:0px; background-color:#4285F4; margin-top:8%;

height:35px; width:80%;margin-left:19%;" type = "submit"

value = "Login" >

<strong>Login</strong>

</button>

</center>

</div>

</form>

</body>

</html>

The template will display a login form and post the result to our login view above. You have
probably noticed the tag in the template, which is just to prevent Cross-site Request Forgery
(CSRF) attack on your site.

{% csrf_token %}

Once we have the login template, we need the loggedin.html template that will be rendered after
form treatment.

<html>

<body>

You are : <strong>{{username}} </strong>

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 56


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

</body>

</html>

Now, we just need our pair of URLs to get started: myapp/urls.py

from django.conf.urls import patterns, url

from django.views.generic import TemplateView

urlpatterns = patterns('myapp.views',

url(r'^connection/',TemplateView.as_view(template_name = 'login.html')),

url(r'^login/', 'login', name = 'login'))

When accessing "/myapp/connection", we will get the following login.html template rendered −

Setting Up Sessions

In Django, enabling session is done in your project settings.py, by adding some lines to the
MIDDLEWARE_CLASSES and the INSTALLED_APPS options. This should be done while
creating the project, but it's always good to know, so MIDDLEWARE_CLASSES should have −

'django.contrib.sessions.middleware.SessionMiddleware'

And INSTALLED_APPS should have −

'django.contrib.sessions'

By default, Django saves session information in database (django_session table or collection),


but you can configure the engine to store information using other ways like: in file or in cache.

When session is enabled, every request (first argument of any view in Django) has a session
(dict) attribute.

Let's create a simple sample to see how to create and save sessions. We have built a simple login
system before (see Django form processing chapter and Django Cookies Handling chapter). Let
us save the username in a cookie so, if not signed out, when accessing our login page you won’t
see the login form. Basically, let's make our login system we used in Django Cookies handling
more secure, by saving cookies server side.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 57


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

For this, first lets change our login view to save our username cookie server side −

def login(request):

username = 'not logged in'

if request.method == 'POST':

MyLoginForm = LoginForm(request.POST)

if MyLoginForm.is_valid():

username = MyLoginForm.cleaned_data['username']

request.session['username'] = username

else:

MyLoginForm = LoginForm()

return render(request, 'loggedin.html', {"username" : username}

Then let us create formView view for the login form, where we won’t display the form if cookie
is set

def formView(request):

if request.session.has_key('username'):

username = request.session['username']

return render(request, 'loggedin.html', {"username" : username})

else:

return render(request, 'login.html', {})

Now let us change the url.py file to change the url so it pairs with our new view −

from django.conf.urls import patterns, url

from django.views.generic import TemplateView

urlpatterns = patterns('myapp.views',

url(r'^connection/','formView', name = 'loginform'),

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 58


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

url(r'^login/', 'login', name = 'login'))

When accessing /myapp/connection, you will get to see the following page

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 59


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-6
TESTING

6.1 Testing

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 60


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality of
components, sub assemblies, assemblies and/or a finished product It is the process of exercising
software with the intent of ensuring that the Software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various types of test. Each
test type addresses a specific testing requirement.

6.2 TYPES OF TESTS


6.2.1 Unit testing
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs. All
decision branches and internal code flow should be validated. It is the testing of individual
software units of the application .it is done after the completion of an individual unit before
integration. This is a structural testing, that relies on knowledge of its construction and is
invasive. Unit tests perform basic tests at component level and test a specific business process,
application, and/or system configuration. Unit tests ensure that each unique path of a business
process performs accurately to the documented specifications and contains clearly defined inputs
and expected results.

6.2.2 Integration testing


Integration tests are designed to test integrated software components to
determine if they actually run as one program. Testing is event driven and is more concerned
with the basic outcome of screens or fields. Integration tests demonstrate that although the
components were individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing is specifically aimed at
exposing the problems that arise from the combination of components.

6.2.3 Functional test


Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 61


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be exercised.

Systems/Procedures : interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key


functions, or special test cases. In addition, systematic coverage pertaining to identify Business
process flows; data fields, predefined processes, and successive processes must be considered for
testing. Before functional testing is complete, additional tests are identified and the effective
value of current tests is determined.

6.2.4 System Test


System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An example of
system testing is the configuration oriented system integration test. System testing is based on
process descriptions and flows, emphasizing pre-driven process links and integration points.

White Box Testing


White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at least its purpose.
It is purpose. It is used to test areas that cannot be reached from a black box level.

Black Box Testing


Black Box Testing is testing the software without any knowledge of the inner workings, structure
or language of the module being tested. Black box tests, as most other kinds of tests, must be
written from a definitive source document, such as specification or requirements document, such
as specification or requirements document. It is a testing in which the software under test is
treated, as a black box .you cannot “see” into it. The test provides inputs and responds to outputs
without considering how the software works.

6.3 Test strategy and approach

Field testing will be performed manually and functional tests will be written in detail.

Test objectives

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 62


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

 All field entries must work properly.


 Pages must be activated from the identified link.
 The entry screen, messages and responses must not be delayed.

Features to be tested
 Verify that the entries are of the correct format
 No duplicate entries should be allowed
 All links should take the user to the correct page.
6.3.1 Integration Testing
Software integration testing is the incremental integration testing of two or more
integrated software components on a single platform to produce failures caused by interface
defects.

The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level –
interact without error.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

6.3.2 Acceptance Testing


User Acceptance Testing is a critical phase of any project and requires significant participation
by the end user. It also ensures that the system meets the functional requirements.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 63


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-7
SOURCE CODE

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 64


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

8.1 Source Code

User side views.py

import re

from django.conf import settings

from django.shortcuts import render, HttpResponse

from .forms import UserRegistrationForm

from django.contrib import messages

from .models import UserRegistrationModel

import pandas as pd

import csv

# from .utility import preprocess

# Create your views here.

def UserRegisterActions(request):

if request.method == 'POST':

form = UserRegistrationForm(request.POST)

if form.is_valid():

print('Data is Valid')

form.save()

messages.success(request, 'You have been successfully registered')

form = UserRegistrationForm()

return render(request, 'UserRegistrations.html', {'form': form})

else:

messages.success(request, 'Email or Mobile Already Existed')

print("Invalid form")

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 65


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

else:

form = UserRegistrationForm()

return render(request, 'UserRegistrations.html', {'form': form})

def UserLoginCheck(request):

if request.method == "POST":

loginid = request.POST.get('loginid')

pswd = request.POST.get('pswd')

print("Login ID = ", loginid, 'Password = ', pswd)

try:

check = UserRegistrationModel.objects.get(loginid=loginid, password=pswd)

status = check.status

print('Status is = ', status)

if status == "activated":

request.session['id'] = check.id

request.session['loggeduser'] = check.name

request.session['loginid'] = loginid

request.session['email'] = check.email

print("User id At", check.id, status)

return render(request, 'users/UserHome.html', {})

else:

messages.success(request, 'Your Account Not at activated')

return render(request, 'UserLogin.html')

except Exception as e:

print('Exception is ', str(e))

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 66


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

pass

messages.success(request, 'Invalid Login id and password')

return render(request, 'UserLogin.html', {})

def UserHome(request):

return render(request, 'users/UserHome.html', {})

def Training(request):

from django.conf import settings

import tensorflow as tf

from keras.models import Sequential

from keras.layers import Convolution2D

from keras.layers import MaxPooling2D

from keras.layers import Flatten

from keras.layers import Dense, Dropout

import os

sz = 128

# Step 1 - Building the CNN

# Initializing the CNN

classifier = Sequential()

classifier.add(Convolution2D(32, (3, 3), input_shape=(sz, sz, 1), activation='relu'))

classifier.add(MaxPooling2D(pool_size=(2, 2)))

classifier.add(Convolution2D(64, (3, 3), activation='relu'))

classifier.add(MaxPooling2D(pool_size=(2, 2)))

classifier.add(Flatten())

# Adding a fully connected layer

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 67


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

classifier.add(Dense(units=128, activation='relu'))

classifier.add(Dropout(0.20))

classifier.add(Dense(units=112, activation='relu'))

classifier.add (Dropout(0.10))

classifier.add(Dense(units=96, activation='relu'))

classifier.add(Dropout(0.10))

classifier.add(Dense(units=80, activation='relu'))

classifier.add(Dropout(0.10))

classifier.add(Dense(units=64, activation='relu'))

classifier.add(Dense(units=35, activation='softmax')) # softmax for more than 2

# Compiling the CNN

classifier.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])

classifier.summary()

from keras.preprocessing.image import ImageDataGenerator

train_datagen = ImageDataGenerator(

rescale=1. / 255,

shear_range=0.2,

zoom_range=0.2,

horizontal_flip=False)

test_datagen = ImageDataGenerator(rescale=1. / 255)

train_dataset = settings.MEDIA_ROOT + '//' + "train"

test_dataset = settings.MEDIA_ROOT + '//' + "test"

print('datasets loaded')

training_set = train_datagen.flow_from_directory(train_dataset,

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 68


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

target_size=(sz, sz),

batch_size=10,

color_mode='grayscale',

class_mode='categorical')

test_set = test_datagen.flow_from_directory(test_dataset,

target_size=(sz, sz),

batch_size=10,

color_mode='grayscale',

class_mode='categorical')

history = classifier.fit(

training_set,

# steps_per_epoch=training_set.n//training_set.batch_size, # No of images in training


set/batch size

steps_per_epoch=1, # No of images in training set/batch size

epochs=1,

validation_data=test_set,

validation_steps=test_set.n // test_set.batch_size) # No of images in test set/batch size

# history.saved_model.save("model-all1-alpha.h5")

print('Model Saved')

acc = history.history['acc']

loss = history.history['loss']

print(acc[-1], loss[-1])

return render(request, 'users/training.html', {'acc': acc, 'loss': loss})

def Sign_detection(request):

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 69


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

import numpy as np

import cv2

import time

import keras

import tensorflow as tf

# from tensorflow.keras.models import load_model

from string import ascii_uppercase

gpus = tf.config.experimental.list_physical_devices('GPU')

if gpus:

try:

tf.config.experimental.set_virtual_device_configuration(gpus[0], [

tf.config.experimental.VirtualDeviceConfiguration(memory_limit=2048)])

except RuntimeError as e:

print(e)

# model_path = settings.MEDIA_ROOT + '//' + "model-all1-alpha.h5"

# model = keras.models.load_model("D:\\Aman\\PycharmProjects\\ISL-Data Collection\\


model-delete-2.h5")

# model = keras.models.load_model("D:\\Aman\\PycharmProjects\\ISL-Data Collection\\


model-new-try.h5")

print('trying to load model')

model = tf.keras.models.load_model(settings.MEDIA_ROOT + '//' + "model-all1-alpha.h5")

# model = keras.models.load_model("./model-all1-alpha.h5")

print('loaded model')

# model = keras.models.load_model("D:\\Downloads\\model-1st-alpha.h5")

cam = cv2.VideoCapture(0)

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 70


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

alpha_dict = {}

j=0

for i in ascii_uppercase:

alpha_dict[j] = i

j=j+1

alpha_dict.update({26: '0'})

alpha_dict.update({27: '1'})

alpha_dict.update({28: '2'})

alpha_dict.update({29: '3'})

alpha_dict.update({30: '4'})

alpha_dict.update({31: '5'})

alpha_dict.update({32: '6'})

alpha_dict.update({33: '7'})

alpha_dict.update({34: '8'})

alpha_dict.update({35: '9'})

# print(alpha_dict)

capture_duration = 50

start_time = time.time()

Result_list = []

while (int(time.time() - start_time) < capture_duration):

_, frame = cam.read()

frame = cv2.flip(frame, 10)

cv2.rectangle(frame, (319, 9), (620 + 1, 309), (0, 255, 0), 1)

roi = frame[10:300, 320:620]

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 71


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

# cv2.imshow("Frame", frame)

gray = cv2.cvtColor(roi, cv2.COLOR_BGR2GRAY)

gaussblur = cv2.GaussianBlur(gray, (5, 5), 2)

smallthres = cv2.adaptiveThreshold(gaussblur, 255,


cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY_INV, 9,

2.8)

ret, final_image = cv2.threshold(smallthres, 70, 255, cv2.THRESH_BINARY_INV +


cv2.THRESH_OTSU)

cv2.imshow("BW", final_image)

final_image = cv2.resize(final_image, (128, 128))

final_image = np.reshape(final_image, (1, final_image.shape[0], final_image.shape[1], 1))

pred = model.predict(final_image)

# print(pred)

print(alpha_dict[np.argmax(pred)])

a = alpha_dict[np.argmax(pred)]

Result_list.append(a)

cv2.putText(frame, alpha_dict[np.argmax(pred)], (10, 50),


cv2.FONT_HERSHEY_COMPLEX, 1, (0, 255, 0), 1)

cv2.imshow("Frame", frame)

k = cv2.waitKey(1) & 0xFF

if k == 27:

break

# time.sleep(10)

# time.close()

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 72


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

cam.release()

cv2.destroyAllWindows()

return render(request, 'users/capture.html', {'Sign_symbol': [*set(Result_list)]})

def speach_data(request):

return render(request, 'users/speaknow.html', {})

def speach_to_text(request):

import speech_recognition as sr

import pyttsx3

import os

r = sr.Recognizer()

image_names = os.path.join(settings.MEDIA_ROOT, 'sign words')

dir_list = os.listdir(image_names)

dir_list = list(map(str.lower, dir_list))

lst = [os.path.splitext(x)[0] for x in dir_list]

print(lst)

def SpeakText(command):

engine = pyttsx3.init()

engine.say(command)

engine.runAndWait()

SpeakText("Now please speak a name")

try:

with sr.Microphone() as source2:

r.adjust_for_ambient_noise(source2, duration=0.2)

audio2 = r.listen(source2)

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 73


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

MyText = r.recognize_google(audio2)

MyText = MyText.lower()

print("Did you say ", MyText)

SpeakText(MyText)

if MyText in lst:

detected_sign = MyText

else:

detected_sign = 'thank you'

# p =os.path.join(image_names, detected_sign+".jpg")

return render(request, 'users/speaknow.html', {'path': detected_sign+".jpg"})

except sr.RequestError as e:

print("Could not request results; {0}".format(e))

except sr.UnknownValueError:

print("unknown error occured")

return render(request, 'users/speaknow.html', {'path': "thank you.jpg"})

index.html:

{% extends 'base.html' %}

{% load static %}

{% block content %}

<header class="masthead d-flex align-items-center">

<div class="container px-4 px-lg-5 text-center">

<h1 class="mb-1">Indian Sign Language </h1>

<h3 class="mb-5"><em class="text-white">An Efficient Approach for Interpretation of


Indian Sign Language using Machine Learning</em></h3>

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 74


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

<a class="btn btn-primary btn-xl" href="#about">Find Out More</a>

</div>

</header>

<!-- &lt;!&ndash; Portfolio&ndash;&gt;-->

<!-- <section class="content-section" id="portfolio">-->

<!-- <div class="container px-4 px-lg-5">-->

<!-- <div class="content-section-heading text-center">-->

<!-- <h3 class="text-secondary mb-0">Portfolio</h3>-->

<!-- <h2 class="mb-5">Our <span class="text-white">Projects </span></h2>-->

<!-- </div>-->

<!-- <div class="row gx-0">-->

<!-- <div class="col-lg-6">-->

<!-- <a class="portfolio-item" href="#!">-->

<!-- <div class="caption">-->

<!-- <div class="caption-content">-->

<!-- <div class="h2">Data Science</div>-->

<!-- <p class="mb-0">Data science is the field of applying advanced analytics


techniques and-->

<!-- scientific principles to extract valuable information from data for business-->

<!-- decision-making-->

<!-- </p>-->

<!-- </div>-->

<!-- </div>-->

<!-- <img class="img-fluid" src="{% static 'img/performance-3.jpg' %}" alt="..."/>-->

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 75


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

<!-- </a>-->

<!-- </div>-->

<!-- <div class="col-lg-6">-->

<!-- <a class="portfolio-item" href="#!">-->

<!-- <div class="caption">-->

<!-- <div class="caption-content">-->

<!-- <div class="h2">Machine Learning</div>-->

<!-- <p class="mb-0">-->

<!-- Machine learning is a method of data analysis that automates analytical model-->

<!-- building.-->

<!-- </p>-->

<!-- </div>-->

<!-- </div>-->

<!-- <img class="img-fluid" src="{% static 'img/performance.jpg' %}" alt="..."/>-->

<!-- </a>-->

<!-- </div>-->

<!-- <div class="col-lg-6">-->

<!-- <a class="portfolio-item" href="#!">-->

<!-- <div class="caption">-->

<!-- <div class="caption-content">-->

<!-- <div class="h2">Artificial Intelligence</div>-->

<!-- <p class="mb-0">-->

<!-- Artificial intelligence is the simulation of human intelligence processes by-->

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 76


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

<!-- machines, especially computer systems. Specific applications of AI


include expert-->

<!-- systems, natural language processing, speech recognition and machine


vision.-->

<!-- </p>-->

<!-- </div>-->

<!-- </div>-->

<!-- <img class="img-fluid" src="{% static 'img/performance-4.jpg' %}"


alt="..."/>-->

<!-- </a>-->

<!-- </di v>-->

<!-- <div class="col-lg-6">-->

<!-- <a class="portfolio-item" href="#!">-->

<!-- <div class="caption">-->

<!-- <div class="caption-content">-->

<!-- <div class="h2">Neural Network</div>-->

<!-- <p class="mb-0">A neural network is a series of algorithms that endeavors to


recognize-->

<!-- underlying relationships in a set of data through a process that mimics the way
the-->

<!-- human brain operates. In this sense, neural networks refer to systems of
neurons,-->

<!-- either organic or artificial in nature.</p>-->

<!-- </div>-->

<!-- </div>-->

<!-- <img class="img-fluid" src="{% static 'img/portfolio-4.jpg' %}" alt="..."/>-->

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 77


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

<!-- </a>-->

<!-- </div>-->

<!-- </div>-->

<!-- </div>-->

<!-- </section>-->

{% endblock %}

Base.html:

{% load static %}

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

<meta name="description" content="" />

<meta name="author" content="" />

<title>Indian Sign Language</title>

<!-- Favicon-->

<link rel="icon" type="image/x-icon" href=" {% static 'favicon.ico' %}" />

<!-- Font Awesome icons (free version)-->

<script src="https://use.fontawesome.com/releases/v5.15.3/js/all.js"
crossorigin="anonymous"></script>

<!-- Simple line icons-->

<link href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.5.5/css/simple-line-
icons.min.css"

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 78


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

rel="stylesheet" />

<!-- Google fonts-->

<link href="https://fonts.googleapis.com/css?
family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic"

rel="stylesheet" type="text/css" />

<!-- Core theme CSS (includes Bootstrap)-->

<link href="{% static 'css/styles.css' %}" rel="stylesheet" />

<!-- Bootstrap CDN HERE -->

<!-<link="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"

integrity="sha384-
Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">

-->

</head>

<body id="page-top" style="background-image: url({% static 'img/isl-1.jpg' %})">

<!-- Navigation-->

<a class="menu-toggle rounded" href="#"><i class="fas fa-bars"></i></a>

<nav id="sidebar-wrapper">

<ul class="sidebar-nav">

<li class="sidebar-brand"><a href="#page-top">Indian Sign Language</a></li>

<li class="sidebar-nav-item"><a href="{% url 'index' %}">Home</a></li>

<li class="sidebar-nav-item"><a href="{% url 'UserLogin' %}">User</a></li>

<li class="sidebar-nav-item"><a href="{% url 'AdminLogin' %}">Admin</a></li>

<li class="sidebar-nav-item"><a href="{% url 'UserRegister' %}">Register</a></li>

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 79


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

{# <li class="sidebar-nav-item"><a href="#contact">Contact</a></li>#}

</ul>

</nav>

<!-- Header-->

{% block content %}

{% endblock %}

<!-- Map-->

<!-- Footer-->

<footer class="footer text-center">

<div class="container px-4 px-lg-5">

<!-- <ul class="list-inline mb-5">-->

<!-- <li class="list-inline-item">-->

<!-- <a class="social-link rounded-circle text-white mr-3" href="#!"><i-->

<!-- class="icon-social-facebook"></i></a>-->

<!-- </li>-->

<!-- <li class="list-inline-item">-->

<!-- <a class="social-link rounded-circle text-white mr-3" href="#!"><i-->

<!-- class="icon-social-twitter"></i></a>-->

<!-- </li>-->

<!-- <li class="list-inline-item">-->

<!-- <a class="social-link rounded-circle text-white" href="#!"><i class="icon-social-


github"></i></a>-->

<!-- </li>-->

<!-- </ul>-->

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 80


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

<p class="text-muted small mb-0">Copyright : Alex Corporation &copy; Your Website


2023</p>

</div>

</footer>

<!-- Scroll to Top Button-->

<a class="scroll-to-top rounded" href="#page-top"><i class="fas fa-angle-up"></i></a>

<!-- Bootstrap core JS-->

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></
script>

<!-- Core theme JS-->

<script src="{% static 'js/scripts.js' %}"></script>

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"

integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/
GpGFF93hXpG5KkN"

crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"

integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskv
Xusvfa0b4Q"

crossorigin="anonymous"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"

integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5
+76PVCmYl"

crossorigin="anonymous"></script>

</body>

</html>

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 81


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-8
RESULTS

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 82


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

8.1 Sample Test Cases

Remarks(IF
S.no Test Case Excepted Result Result
Fails)
If already user
User If User registration
1 Pass email exist then it
Register successfully.
fails.
If Username and password
Un Register Users
2 User Login is correct then it will Pass
will not logged in.
getting valid page.
deep
Here we used deep The request will
learning
learning algorithm and be not accepted
3 algorithm Pass
machine learning other wise its
and machine
algorithms. failed
learning
model under training
Model Results not true
4 results calculated and Pass
training failed
displayed
data is
Model
Model training results consider
5 training Pass
calculated and displayed for
results
testing
Model
Model accuracy and model
accuracy Results not true
6 loss will be displayed by Pass
and model failed
the user
loss
Prediction Indian sign Results not true
7 Pass
results language failed
Calculate Accuracy and loss
Accuracy and loss
8 accuracy, Pass not displayed
calculated
Loss. failed
Admin can login with his Invalid login
9 Admin login login credential. If success Pass details will not
he get his home page allowed here
Admin can
If user id not
activate the Admin can activate the
10 Pass found then it
register register user id
won’t login.
users

Table:7.1 Sample Test Cases

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 83


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

8.2 SCREEN SHOTS

Home page

Fig:8.2.1Home Page

Register Form

Fig:8.2.2 Registration

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 84


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Admin Login Page:

Fig:8.2.3 Admin Login page

Admin home page:

Fig:8.2.4 Admin Home Page

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 85


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Activate User

Fig:8.2.5 Activate user

User Login Page:

Fig:8.2.6 User Login Page

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 86


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

User Home Page:

Fig:8.2.7 User Home Page

Model training:

Fig:8.2.8 Model Training

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 87


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Sign detection:

Fig:8.2.9 Sign Detection

Sign caption:

Fig:8.2.10 Sign Caption

Speech to text:

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 88


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Fig:8.2.11 Speech to Text

CHAPTER-9
CONCLUSION

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 89


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

From the results obtained, it is inferred that the SVM classifier along with the K-means clustering
and BoV classifiers is best suited for gesture recognition. A user friendly application that can
interpret Indian Sign Language has been developed using the most efficient SVM classifier (for
gesture to text conversion) and Google Speech Recognition API (for speech to gesture conversion).
Thus, a more reliable sign language interpretation system has been developed.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 90


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-10
BIBLIOGRAPHY

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 91


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

REFERENCES

[1] Cheok Ming Jin, Zaid Omar, Mohamed Hisham Jaward, ”A Mobile Application of American
Sign Language Translation via Image Processing Algorithms”, in IEEE Region 10 Symposium,
on IEEEexplore, 2016.

[2] Mr. Sanket Kadam, Mr. Aakash GhodkeProf. Sumitra Sadhukhan, ”Hand Gesture
Recognition Software based on ISL”, IEEE Xplore, 20 June 2019.

[3] Kartik Shenoy, Tejas Dastane, Varun Rao, Devendra Vyavaharkar,” Real-time Indian Sign
Language (ISL) Recognition”, IEEE Xplore: 18 October 2018.

[4] T Raghuveera, R Deepthi, R Mangalashri And R Akshaya, “A depth based ISL Recognition
using Microsoft Kinect”, ScienceDirect, 2018.

[5] Muthu Mariappan H, Dr Gomathi V, “Real time Recognition of ISL”, IEEE Xplore: 10
October 2019.

[6] G. Ananth Rao a, P.V.V. Kishore, “Selfie video based continuous Indian sign language
recognition system”, ScienceDirect, 2018.

[7] G. Ananth Rao a, P.V.V. Kishore, “Sign Language Recognition Based On Hand And Body
Skeletal Data”, IEEE 2018.

[8] Suharjitoa, Ricky Andersonb, Fanny Wiryanab, Meita Chandra Ariestab, Gede Putra
Kusuma, “Sign Language Recognition Application Systems for Deaf-Mute People: A Review
Based on Input-Process-Output”, ScienceDirect, 2017.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 92


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

CHAPTER-11
FUTURE ENHANCEMENT

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 93


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Communication is a vital activity of human beings to live, as they can express their feel-ing,
encourage cooperation and social bond, share their idea, and work together in soci-ety through
communication only. People who are not able to hear or speak (hearing-impaired people) uses
sign language as a mean of communication. Like spoken language, sign language also emerges
and evolves naturally within hearing-impaired persons. It is a visual form of communication and
in each country/region, where the hearing-impaired.

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 94


An Efficient Approach for Interpretation of Indian Sign Language Using Machine Learning

Dept,of CSE,SREE RAMA ENGINEERING COLLEGE Page | 95

You might also like