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

Face Emotion Recognition Using Python Project 19nr1ao595

The document describes a project that aims to develop a facial emotion recognition system using Python. It discusses existing facial emotion recognition systems that provide incorrect outputs and proposes a system using convolutional neural networks and image edge detection. The system would extract edge information from facial expression images and superimpose it on feature images to preserve texture structure information. The project report is submitted in partial fulfillment of the Bachelor of Technology degree in computer science and engineering at Baba Institute of Technology and Sciences.

Uploaded by

Abdullah Ansari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
589 views

Face Emotion Recognition Using Python Project 19nr1ao595

The document describes a project that aims to develop a facial emotion recognition system using Python. It discusses existing facial emotion recognition systems that provide incorrect outputs and proposes a system using convolutional neural networks and image edge detection. The system would extract edge information from facial expression images and superimpose it on feature images to preserve texture structure information. The project report is submitted in partial fulfillment of the Bachelor of Technology degree in computer science and engineering at Baba Institute of Technology and Sciences.

Uploaded by

Abdullah Ansari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

lOMoARcPSD|33172637

FACE Emotion Recognition Using Python Project


19NR1AO595
Computer Science (Anna University)

Studocu is not sponsored or endorsed by any college or university


Downloaded by Abdullah Ansari (idfake0104@gmail.com)
lOMoARcPSD|33172637

FACE EMOTIONS RECOGNITION BY PYTHON


A Project report submitted

in partial fulfilment of the requirements for the award of the

degree of

BACHELOR OF TECHNOLOGY

IN COMPUTER SCIENCE AND ENGINEERING

By

19NR1A0595 S.VASANTHAKUMARI
DEPERTMENT OF COMPUTER SCIENCE AND ENGINEERING

BABA INSTITUTE OF TECHNOLOGY AND SCIENCES


(Permanently Approved by A.I.C.T.E & Affiliated to J.N.T.U, Kakinada)

PM Palem, Visakhapatnam District, Andhra Pradesh

(2018-2022)

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

DECLARATION

The project report entitled “ FACE EMOTION RECOGNITION BY PYTHON ” is a record of bonafide
work of 19NR1A0595 S.VASANTHAKUMARI submitted in partial fulfillment for the award of
B- tech

In Computer Science Engineering to the JNTUK University. The results which are embodied
in this report have not been copied from any other departments/Universities/Institute

19NR1A0595 S.VASANTHA KUMARI

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

CERTIFICATE
This is to certify that the project report entitled “FACE EMOTIONS RECOGNITION BY PYTHON” is
being submitted by 19NR1A0595 S.VASANTHA KUMARI submitted in partial fulfilment for award of
B-Tech in department of Computer Science Engineering to the JNTUK University is a record of bona
fide work carried out under our graduate and super vision. The results which are embodied in this
report have not been copied from any other Department/University/Institute

Mr. S. DURGA PRASAD Mr.K S N MURTHY

HEAD OF DEPARTMENT Assistant professor

Department of CSE Department of CSE

JNTU Kakinada JNTU Kakinada

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

ACKNOWLEDGEMENT
The success in this project would not have been possible but for the timely help and guidance
rendered by many people. Our sincere thanks to all those who has assisted us in one way or the
other for the completion of my project

Our greatest appreciation to our guide Assistant professor, Department of Computer Science and
Engineering which cannot be expressed in words for his tremendous support, encouragement and
guidance for this project.

We express our gratitude to Mr. S. DURGA PRASAD, Head of the Department for Computer Science
and Engineering for providing us with adequate facilities, ways and means by which we are able to
complete this project.

We thank all the members of teaching and non-teaching staff members, and also who have assisted
me directly or indirectly or indirectly for successful completion of this project.

Finally, the project is done by me without any help successfully.

S.VASANTHA KUMARI(19NR1A0595)

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

ABSTRACT
Emotion facial expression can inform researchers about an individual’s emotional state.
Recent technological advances open up new avenues to automatic facial expression
recognition. Based on machine learning , such technology can tremendously increase the
amount of processed data.FER is now is easily accessible and has been validated for the
classification of standardized prototypical facial expressions .However , applicability to more
naturalistic facial expressions still remains uncertain.To avoid the complex process of
explicit feature extraction in traditional facial expression recognition, a face
expression recognition method based on a convulational neural network (CNN) and an
image edge detection is proposed. Firstly, the facial expression image is normalized, and the
edge of each layer of the image is extracted in the convolution process.
The extracted edge information is superimposed on each feature image to preserve the
edge structure information of the texture image.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

INDEX
1 .INTRODUCTION

1 1.1 FEASABILITY STUDY


2 1.2 EXISTING SYSTEM
3 1.3 PROPOSED SYSTEM

2. SOFTWARE REQUIREMENT SPECIFICATION

2.1 INTRODUCTION 5
2.2 EXTERNAL INTERFACE REQUIREMNET
2.3 SYSTEM FEATURES
2.4 OTHER NON-FUNCTIONAL REQUIREMENTS

3. ANALYSIS 15

3.1 USE CASE DIAGRAM


3.2 SEQUENCE DIAGRAM
3.3 COLLABORATION DIAGRAM
3.4 ACTIVITY DIAGRAM

4. DESIGN

4.1 ARCHITECTURE
4.2 PROJECT FLOW
4.3 CLASS DIAGRAM
4.4 COMPONENT DIAGRAM
4.5 DEPLOYEMENT DIAGRAM

5. IMPLEMENTATION

5.1 INTRODUCTION TO TECHNOLOGY


5.2 SAMPLE CODE
5.3 SCREENSHOTS

6. TESTING

6.1 INTRODUCTION TO TESTING


6.2 SAMPLE TEST CASES

7. CONCLUSION

8. FUTURE ENHANCEMENT

9. REFERENCES

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

LIST OF FIGURES FIGURE


TITLE

USE CASE DIAGRAM

SEQUENCE DIAG

COLLABORATION DIAGRAM

ACTIVITY DIAGRAM

ARCHITECTURE

PROJECT FLOW

CLASS DIAGRAM

COMPONENT DIAGRAM

DEPLOYMENT DIAGRAM

1.INTRODUCTON

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

Facial Emotion Recognition is a technology used for analysing sentiments by different


sources, such as pictures and videos. It belongs to the family of technologies often referred
to as ‘affective computing’, a multidisciplinary field of research on computer’s capabilities to
recognise and interpret human emotions and affective states and it often builds on Artificial
Intelligence providing hints for human emotions. For decades, decoding such emotion
expressions has been a research interest in the field of psychology (Ekman and Friesen 2003;
Lang et al. 1993) but also to the Human Computer Interaction field (Cowie et al. 2001; Abdat
et al. 2011). Recently, the high diffusion of cameras and the technological advances in
biometrics analysis, machine learning and pattern recognition have played a prominent role
in the development of the FER technology.

Many companies, ranging from tech giants such as NEC or Google to smaller ones, such as
Affectiva or Eyeris invest in the technology, which shows its growing importance. There are
also several EU research and innovation program Horizon2020 initiatives1 exploring the use
of the technology.

1.2 EXISTING SYSTEM


In the existing system they have gone through with the open CV but while extraction of the
face emotions they got the wrong outputs. There is no exact face emotions representation
of expression with accuracy.

1.3 PROPOSED SYSTE


Where the data subjects’ facial expressions are captured in a remote manner, it may not be clear to
them which system or application will process their data, for which purposes, and who the
controllers are.

As a result, they would not be in the position to freely give consent or exercise control over the
processing of their personal data, including sharing with third-parties. Where data subjects are not
provided with accurate information, access and control over the use of FER

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

1.4 IMPLEMENTATION TECNIQUES


 IMAGE CAPTURE
The ability to understand facial expressions is an important
part of nonverbal communication. If you only listen to what a person says
and ignore what their face is telling you, then you really won't get the
whole story. Often, words do not match emotions, and the face betrays
what a person is actually feeling.

2. SOFTWARE REQUIREMENT SPECIFICATION

2.1 INTRODUCTION
It is integrated software for identifying an individual's face image from a
database of facial images. The software can tolerate pose, intensity and
expression variation within a limit. The software is tested with field
condition image set. Textural features around 14 fiducial points and Shape
features of eye and eyebrows are used to develop signature of the image.
Features :

 Textural features around 14 fiducial points.


 Shape features of eye and eyebrows.
 Searching Time - 5 seconds per query image against a database of
size 5000.
 Limits of PIE variation:
o Pose variation - 20%

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

o Illumination variation - 20% of relative illumination variation


o Expression Variation - Can tolerate deformation caused by
natural expressions.

Application Areas :

 Access Control
 Airport Security
 Financial Services
 Law Enforcement
 Driver's Licenses & Passport

Benefits :

 Ease of enrollment
 High accuracy
 Suitable for large or small databases
 One-to-many searching
 Compatible with SQL server.
 Database of 5000 Indian and with other biometrics is completed

System Requirements :

 4 GB RAM (Minimum)
 80 GB HDD
 Dual Core processor
 CDROM (installation only). VGA resolution monitor
 Microsoft Windows 98/2000/NT with service pack 6 / XP with service
pack 2/ Windows 7 with service pack 2
 SQL Server 2008 R2

Following are the fearyres of a good SRS document:


 Passive live ness detection:

Anti-spoofing improves security and identification with the help of


face recognition

Passive live ness detection is the most sophisticated anti-spoofing technology. It does
not require any special hardware, nor does it ask users to perform any actions to prove
the live ness - it just works as-is by analyzing images.

 Thermal face detection:


Detect t human faces on images from thermal cameras quickly and efficiently
.measure body temperature ,screen for fever ,or simply improve

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

2.2 EXTERNAL INTERFACE REQUIREMENTS


In this, software interfaces which mean how software program communicates with
each other or users either in form of any language, code, or message are fully described
and explained. Examples can be shared memory, data streams, etc.

These requirements include user interfaces (interaction logic between software and
user), screen layouts, buttons, functions on every screen, hardware interfaces (here a
team describes what devices the software is created for), and other relevant
particularities. Also, software interfaces like frontend and backend stack, database
management system, etc. must be included.

2.2.1 USER INTERFACES


This tells about user interfaces how it will work and how it will be display like that. User
interface is part of software and is designed such a way that it is expected to provide the
user insight of the software. UI provides fundamental platform for human-computer
interaction.

 Frontend - HTML, CSS


 Backend - Python
 Database - MYSQL

2.2.2 HARDWARE INTERFACES


The most common set of requirements defined by any operating system or software
application is the physic computer resources, also known as hardware, a hardware
requirements list is often accompanied by a hardware capability list (HCL), especially in
case of operating systems. An HCL lists tested, compatible, and sometimes incompatible
hardware devices for a particular operating system or application. The following
subsection discuss the various aspects of hardware requirements.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

Processor - I3/Intel Processor


RAM - 8GB (min)
Hard Disk - 128GB
Key Board - Standard Windows
mouse - Two or Three Button mouse

2.2.3 SOFTWARE INTERFACE

These describe what external interfaces and connections must be supported by the
software, and provide detail of what will be supported. Protocols should be referenced in
the SRS but should not be part of the SRS

. Operating System - Windows 10 •

Server-side Script - Python 3.6 •

IDE - - PyCharm

Libraries Used - Pandas, NumPy, Scikit-Learn.

Frame Work - Flask

3.ANALYSIS
UML DIAGRAMS
UML stands for Unified Modelling Language. UML is a standardized general-purpose
modelling 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.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

The Unified Modelling Language is a standard language for specifying, Visualization,


Constructing and documenting the anti facts of software system, as well as for business
modelling and other non-software systems.

The UML represents a collection of best engineering practices that have proven
successful in the modelling 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.

The Primary goals in the design of the UML are as follows:

Provide users a ready-to-use, expressive visual modelling Language so that they can
develop and exchange meaningful models.

• Provide extensibility and specialization mechanisms to extend the core concepts.

• Be independent of particular programming languages and development process.

• Provide a formal basis for understanding the modelling language

• Encourage the growth of OO tools market

. • Support higher level development concepts such as collaboration

Applications
The UML is intended primarily for software-intensive system.

It has been used effectively for such domains as

• Enterprise information system

• Banking and financial services

• Telecommunications

• Defense / aerospace

• Retail

• Medical electronics
• Distributed Web-based services

A Conceptual Model of the UML

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

To understand the UML, you need to form a conceptual model of the language, and this
requires learning three major elements: the UML’s basic building blocks.

Building Blocks of the UML


The vocabulary of the UML encompasses three kinds of building blocks:

1. Things

2. Relationships

3. Diagrams

Things are the abstractions that are first-class citizens in a model; relationships tie these
things together; diagrams group interesting collections of things

Diagrams
The diagrams are the graphical implementation of the models that incorporate symbols and
text. Each symbol has a different meaning in the context of the UML diagram. There are thirteen
different types of UML diagrams that are available in UML 2.0, such that each diagram has its own
set of a symbol. And each diagram manifests a different dimension, perspective, and view of the
system diagrams are classified into three categories that are given below:

• Structural Diagram

• Behavioural Diagram

• Interaction Diagram

3.1 USE CASE DIAGRAM

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

To model a system the most important aspect is to capture the dynamic behaviour. Dynamic
behaviour means the behaviour of the system when it is running. Only static behaviour is not
sufficient to model a system rather dynamic behaviour is more important than static behaviour. In
UML there are five diagrams available to model the dynamic nature and use case diagram is one of
them. Now as we have to discuss the use case diagram is dynamic in nature, there should some
internal or external factors for making the interaction. The internal and external agents are known as
actors. use case diagram consists of actors, use case and their relationships. The diagram is used to
model the system of an application. A single use case diagram captures a particular functionality of a
system

UML Use Case diagram for Face Recognition System is shown below. The various participants of the same are
detailed below:-

Actors:- Trainer, User

The corresponding use cases for these actors are:-

 Trainer: Add Records, Update Records, Delete Records, Convert Image To Binary Image And Save

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

 User: Provide Sample For Matching, Request For Match

3.2 SEQUENCE DIAGRAM


A sequence diagram in Unified Modelling 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 timing diagram

The sequence diagram is used to look at the behaviour of multiple objects


within the face recognition attendance system. Sequence diagrams are
good for showing how objects work together and in what order the
events occur. It shows objects that communicate within the face
recognition attendance system, with messages going from them to each
other down the process in a certain order.

The face recognition attendance system uses a sequence diagram to show


how objects interact and how they happen sequentially. This sequence
diagram

A sequence diagram is a useful tool for documenting a


system’s needs and fleshing out its architecture. Because it depicts the
interaction logic between the items in the system in the time order in
which they occur, the sequence diagram is quite valuable.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

3.3COLLABORATION DIAGRAM
Collaborative face recognition from a sequence in multi camera environment is proposed
for the later ,the appearance of an object in a near by camera is predicted using the last
tracked position of the object paired with a time of arrival model between cameras pairs

We have take the same order management system to describe the collaboration diagram.
The method calls are similar to that of a sequence diagram. But the difference is that
sequence diagram does not describe the object organization where as the collaboration
diagram shown the object organization

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

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 Modelling 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. An activity diagram shows the overall
flow of control. Activity diagrams are constructed from a limited repertoire of shapes, connected
with arrows. The most important shape types:

• Rounded rectangles represent activities

• Diamonds represent decisions

• Bars represent the start (split) or end (join) of concurrent activities

• A black circle represents the start (initial state) of the workflow;

• An encircled black circle represents the end (final state)

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

4.DESIGN
4.1 ARCHITECTURE
The architecture of the System consists of three modules, namely:

 Enrolment Module
 Database
 Identification Module

Enrolment Module

It scans and captures analog or digital image of a living being.

Database

An entity which handles compression, processing, storage and also accounts for
comparison of the captured data with stored data.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

Identification
This module interfaces with the application system.

4.2 PROJECT FLOW


Project Flow is an indicator of change planned for occurrence within a project over time. It shows the
movement of project product from its conceptualization and design through delivery and
deployment. Project flow describes a preset sequence of activities required to plan, produce, deliver
and maintain project product, along with information, materials, and resources required by the
project.

Project flow is a convenient way to define and plan projects. It helps link project budget and
schedule to project activities and tasks. Traditionally it is designed in the form of a chart or diagram
which is a great tool to visually represent how a project is supposed to produce and deploy its
product. Simple tree-like lists or hierarchies of project activities are also used to map out and depict
project flow

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

4.3 CLASS DIAGRAM

Class diagram is a static diagram. It represents the static view of an application. Class diagram is not
only used for visualizing, describing and documenting different aspects of a system but also for
constructing executable code of the software application. Class diagram describe the attributes and
operations of a class and also the constraints imposed other system. The class diagram is widely used
in the modelling of object 18 oriented systems because they are the UML diagrams, which can be
mapped directly with object-oriented languages. Class diagram shows a collection of classes,
interfaces, association, collaboration and constraints.it is also known as a structural diagram

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

In the above class diagram trainer and user are the classes. And in each one has a collection of
Objects. Each object has Some of Attributes, Methods and set of Behaviours. In User Class are Id
char, name char, provide sample(),request to match(),

4.4 COMPONENT DIAGRAM:

A component diagram, also known as a UML component diagram, describes the organization and
wiring of the physical components in a system. Component diagrams are often drawn to help model
implementation details and double-check that every aspect of the system's required function is
covered by planned development.

A component diagram is used to illustrate how components of a system interact with each other.

A component contains a set of collaborating classes. Each class within a component has been fully
elaborated to include all attributes and operations that are relevant to its implementation. As part of
the design elaboration, all interfaces (messages) that enable the classes to communicate and
collaborate with other design classes must also be defined.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

4.5 DEPLOYMENT
A deployment diagram shows the configuration of run-time processing nodes and the components
that live on them. Deployment diagram address the static deployment view of an architecture. They
are related to component diagram in that a node typically encloses one or more components.
Deployment diagrams are used to visualize the topology of the physical components of a system,
where the software components are deployed.The purpose of deployment diagrams can be
described as –

• Visualize the hardware topology of a system.

• Describe the hardware components used to deploy software components.

• Describe the runtime processing nodes.

Now-a-days software applications are very complex in nature. Software applications can be
standalone, web-based, distributed, mainframe-based and many more. Hence, it is very important to
design the hardware components efficiently.

Deployment diagrams can be used –

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

• To model the hardware topology of a system.

• To model the embedded system

. • To model the hardware details for a client/server system

• To model the hardware details of a distributed application.

• For Forward and Reverse engineering

5.1 IMPLEMENTATION
5.1 INTRODUCTION TO TECHNOLOGY
Python is an interpreted, object-oriented, high-level programming language with dynamic
semantics. Its high-level built-in data structures, combined with dynamic typing and dynamic
binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or
glue language to connect existing components together. Python's simple, easy to learn syntax
emphasizes readability and therefore reduces the cost of program maintenance. Python supports
modules and packages, which encourages program modularity and code reuse. The Python
interpreter and the extensive standard library are available in source or binary form without charge
for all major platforms, and can be freely distributed.

It is a platform independent programming language used to secure and robust applications that
may run on any computer.

Often, programmers fall in love with Python because of the increased productivity it provides.
Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python
programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the
interpreter discovers an error, it raises an exception. When the program doesn't catch the exception,

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

the interpreter prints a stack trace. A source level debugger allows inspection of local and global
variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at
a time, and so on. The debugger is written in Python itself, testifying to Python's introspective power.
On the other hand, often the quickest way to debug a program is to add a few print statements to
the source: the fast edit-test-debug cycle makes this simple approach very effective.

Python is a general-purpose programming language, so it can be used for many things. Python is
used for web development, AI, machine learning, operating systems, mobile application
development, and video games. Python is an interpreted, object-oriented, high-level programming
language with dynamic semantics. ... Python's simple, easy to learn syntax emphasizes readability
and therefore reduces the cost of program maintenance. Python supports modules and packages,
which encourages program modularity and code reuse.

History of Python
Python was developed by Guido van Possum in the late eighties and early nineties at the National
Research Institute for Mathematics and Computer Science in the Netherlands.

Python is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68, Small talk,
and UNIX shell and other scripting languages.

Python is copyrighted. Like Perl, Python source code is now available under the GNU General Public
License (GPL).

Python is now maintained by a core development team at the institute, although Guido van Possum
still holds a vital role in directing its progress.

Features of Python:
1. Python is Interpreted

Python is processed at runtime by the interpreter. You do not need to compile your program
before executing it. This is similar to PERL and PHP.

2. Python is Interactive:

You can actually sit at a Python prompt and interact with the interpreter directly to write your
programs.

3. Python is Object Oriented:

Python supports Object-Oriented style or technique of programming that encapsulates code within
objects

4. Python is a beginner’s Language:

Python is a great language for the beginner-level programmers and supports the development of a
wide range of applications from simple text processing to WWW browsers to games

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

5. Expressive Language:

Python can perform complex tasks using a few lines of code. A simple example, the hello world
program where you simply type print("Hello World"). It will take only one line to execute, while Java
or C takes multiple lines.

6. Cross Platform Language:

Python can run equally on different platforms such as Windows, Linux, UNIX, and Macintosh, etc. So,
we can say that Python is a portable language. It enables programmers to develop the software for
several competing platforms by writing a program only once.

7. GUI Programming support:

Graphical User Interface is used for the developing Desktop application. PyQT5, Tkinter, Kivy are the
libraries which are used for developing the web application.

8. Dynamic Memory Allocation

In Python, we don't need to specify the data-type of the variable. When we assign some value to the
variable, it automatically allocates the memory to the variable at run time. Suppose we are assigned
integer value 15 to x, then we don't need to write int x = 15. Just write x = 15 Apart from the above-
mentioned features, Python has a big list of good features, few are listed below

 It supports functional and structured programming methods as well as OOP


 It can be used as a scripting language or can be compiled to byte-code for building large
applications.
 It provides very high-level dynamic data types and supports dynamic type checking.
 It supports automatic garbage collection.
 It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java
DYNAMIC VS. STATIC
 Types Python is a dynamic-typed language. Many other languages are static typed, such as
C/C++ and Java. A static typed language requires the programmer to explicitly tell the
computer what type of “thing” each data value is.
 For example, in C if you had a variable that was to contain the price of something, you would
have to declare the variable as a “float” type.
 This tells the compiler that the only data that can be used for that variable must be a
floating-point number, i.e. a number with a decimal point.
 If any other data value was assigned to that variable, the compiler would give an error when
trying to compile the program.
 Python, however, doesn’t require this. You simply give your variables names and assign
values to them. The interpreter takes care of keeping track of what kinds of 35 objects your
program is using. This also means that you can change the size of the values as you develop
the program. Say you have another decimal number (a.k.a. a floating-point number) you
need in your program.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

 With a static typed language, you have to decide the memory size the variable can take when
you first initialize that variable. A double is a floating-point value that can handle a much
larger number than a normal float.
 If you declare a variable to be a float but later on assign a value that is too big to it, your
program will fail; you will have to go back and change that variable to be a double.
 With Python, it doesn’t matter. You simply give it whatever number you want and Python
will take care of manipulating it as needed. It even works for derived values.
 For example, say you are dividing two numbers. One is a floating-point number and one is
an integer. Python realizes that it’s more accurate to keep track of decimals so it
automatically calculates the result as a floating-point number. VARIABLES
 Variables are nothing but reserved memory locations to store values. This means that when
you create a variable you reserve some space in memory.
 Based on the data type of a variable, the interpreter allocates memory and decides what can
be stored in the reserved memory. Therefore, by assigning different data types to variables,
you can store integers, decimals or characters in these variables.

STANDARD DATATYPES
The data stored in memory can be of many types. For example, a person's age is stored as a numeric
value and his or her address is stored as alphanumeric characters. Python has various standard data
types that are used to define the operations possible on them and the storage method for each of
them. Python has five standard data types –

 Numbers
 String
 List 36
 Tuple Dictionary

PYTHON NUMBERS

Numberdata types store numeric values. Number objects are created when you assign a
value to them

PYTHON STRINGS

Strings in Python are identified as a contiguous set of characters represented in the


quotation marks. Python allows for either pairs of single or double quotes. Subsets of strings can be
taken using the slice operator ([ ] and [:]) with indexes starting at 0 in the beginning of the string and
working their way from -1 at the end.

PYTHON LISTS

Lists are the most versatile of Python's compound data types. A list contains items separated by
commas and enclosed within square brackets ([]). To some extent, lists are similar to arrays in C. One
difference between them is that all the items belonging to a list can be of different data type.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes starting at
0 in the beginning of the list and working their way to end -1. The plus (+) sign is the list
concatenation operator, and the asterisk (*) is the repetition operator.

PYTHON TUPLES

 A tuple is another sequence data type that is similar to the list. A tuple consists of a number
of values separated by commas. Unlike lists, however, tuples are enclosed within
parentheses. The main differences between lists and tuples are: Lists are enclosed in
brackets ([ ]) and their elements and size can be changed, while tuples are enclosed in
parentheses (( )) and cannot be updated. Tuples can be thought of as read-only lists.

DIFFERENT MODES IN PYTHON


 Python has two basic modes: normal and interactive. 37 The normal mode is the mode
where the scripted and finished .pie files are run in the Python interpreter. Interactive mode
is a command line shell which gives immediate feedback for each statementwhile running
previously fed statements in active memory. As new lines are fed into the interpreter, the fed
program is evaluated both in part and in whole

PYTHON LIBRARIES
1.Requests : The most famous http library written by Kenneth remits. It’s a must have for every
python developer

2.Scrappy: If you are involved in web scraping then this is a must have library for you. After using
this library, you won’t use any other.

3. Python: A guy toolkit for python. I have primarily used it in place of tinder. You will really love it.

3 Pillow: A friendly fork of PIL (Python Imaging Library). It is more user friendly than PIL and is a
must have for anyone who works with images.

4. SQL Alchemy: A database library. Many love it and many hate it. The choice is yours.

5. Beautiful Soup: I know it’s slow but this xml and html parsing library is very useful for beginners.

6.Twisted: The most important tool for any network application developer. It has a very beautiful
ape and is used by a lot of famous python developers.

7. Numbly: How can we leave this very important library? It provides some advance math
functionalities to python.

8. Skippy: When we talk about numbly then we have to talk about spicy. It is a It is a library of
algorithms and mathematical tools for python and has caused many scientists to switch from ruby to
python.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

9. Matplotlib: A numerical plotting library. It is very useful for any data scientist or any data
analyser.

10.Pygmy: Which developer does not like to play games and develop them? This library will help
you achieve your goal of 2d game development.

11 Piglet: A 3d animation and game creation engine. This is the engine in which the famous python
port of mine craft was made

12. Pit: A GUI toolkit for python. It is my second choice after python for developing GUI’s for my
python scripts.

13. Pit: Another python GUI library. It is the same library in which the famous Bit torrent client is
created.

14. Scaly: A packet sniffer and analyser for python made in python.

15. Pywin32: A python library which provides some useful methods and classes for interacting with
windows.

16. Notch: Natural Language Toolkit – I realize most people won’t be using this one, but it’s generic
enough. It is a very useful library if you want to manipulate strings. But its capacity is beyond that. Do
check it out.

17. Nose: A testing framework for python. It is used by millions of python developers. It is a must
have if you do test driven development.

18. Pillow: A friendly fork of PIL (Python Imaging Library). It is more user friendly than PIL and is a
must have for anyone who works with images.

19.Simply: Simply can do algebraic evaluation, differentiation, expansion, complex numbers, etc. It
is contained in a pure Python distribution.

20. I Python: I just can’t stress enough how useful this tool is. It is a python prompt on steroids. It
has completion, history, shell capabilities, and a lot more. Make sure that you take a look at it

PYTHON CLASS AND OBJECTS


These are the building blocks of OOP. Class creates a new object. This object can be anything,
whether an abstract data concept or a model of a physical object, e.g. a chair. Each class has
individual characteristics unique to that class, including variables and methods. Classes are very
powerful and currently “the big thing” in most programming languages. Hence, there are several
chapters dedicated to OOP later in the book.

The class is the most basic component of object-oriented programming. Previously, you learned
how to use functions to make your program do something. Now will move into the big, scary world

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

of Object-Oriented Programming (OOP). To be honest, it took me several months to get a handle on


objects.

When I first learned C and C++, I did great; functions just made sense for me.

Having messed around with BASIC in the early ’90s, I realized functions were just like subroutines so
there wasn’t much new to learn.

However, when my C++ course started talking about objects, classes, and all the new features of
OOP, my grades definitely suffered.

Once you learn OOP, you’ll realize that it’s actually a pretty powerful tool. Plus many Python
libraries and APIs use classes, so you should at least be able to understand what the code is doing.

One thing to note about Python and OOP: it’s not mandatory to use objects in your code in a way
that works best; maybe you don’t need to have a full-blown class with initialization code and
methods to just return a calculation. With Python, you can get as technical as you want.

As you’ve already seen, Python can do just fine with functions. Unlike languages such as Java, you
aren’t tied down to a single way of doing things; you can mix functions and classes as necessary in
the same program. This lets you build the code.

Objects are an encapsulation of variables and functions into a single entity. Objects get their
variables and functions from classes. Classes are essentially a template to create your objects.

Here’s a brief list of Python OOP ideas:

The class statement creates a class object and gives it a name. This creates a new namespace.

Assignments within the class create class attributes. These attributes are accessed by qualifying the
name using dot syntax: Class Name. Attribute.

Class attributes export the state of an object and its associated behavior. These attributes are shared
by all instances of a class.

INHERITANCE

First off, classes allow you to modify a program without really making changes to it. To elaborate, by
sub classing a class, you can change the behaviour of the program by simply adding new components
to it rather than rewriting the existing components. As we’ve seen, an instance of a class inherits the
attributes of that class. However, classes can also inherit attributes from other classes. Hence, a
subclass inherits from a super class allowing you to make a generic super class that is specialized via
sub classes.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

Simple code

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

Screen shoots

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

6. TESTING
6.1 INTRODUCTION TO TESTING
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 tests. Each test
type addresses a specific testing requirement.

Goals of Testing

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

The following are goals of testing:

• Testing is a process of executing a program with the intent of finding error.

• A good test case is the one that has a high probability of finding an as at undiscovered error.

• A successful test is one that uncovers an as at undiscovered error.

TYPES OF TESTS
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.

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.

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.

• 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.

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

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

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.

UNIT TESTING

Unit testing is usually conducted as part of a combined code and unit test phase of the software
lifecycle, although it is not uncommon for coding and unit testing to be conducted as two distinct
phases.

Test strategy and approach

Field testing will be performed manually and functional tests will be written in detail. Test objectives
• 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

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.

ACCEPTANCE TESTING

User Acceptance Testing is a critical phase of any project and requires significant

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

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.

SYSTEM TESTING
Testing Methodologies

The following are the Testing Methodologies:

• Unit Testing.

• Integration Testing.

• User Acceptance Testing.

• Output Testing

. • Validation Testing.

Unit Testing:

Unit testing focuses verification effort on the smallest unit of Software design that is the module.
Unit testing exercises specific paths in a module’s control structure to ensure complete coverage and
maximum error detection. This test focuses on each module individually, ensuring that it functions
properly as a unit. Hence, the naming is Unit Testing.

Integration Testing:

Integration testing addresses the issues associated with the dual problems of verification and
program construction. After the software has been integrated a set of high order tests are
conducted. The main objective in this testing process is to take unit tested modules and builds a
program structure that has been dictated by design.

The following are the types of Integration Testing:

1) Top-Down Integration:

This method is an incremental approach to the construction of program structure. Modules are
integrated by moving downward through the control hierarchy, beginning with the main program
module. The module subordinates to the main program module are incorporated into the structure
in either a depth first or breadth first manner. In this method, the software is tested from main
module and individual stubs are replaced when the test proceeds downwards.

2) Bottom-up Integration:

This method begins the construction and testing with the modules at the lowest level in the
program structure. Since the modules are integrated from the bottom up, processing required for
modules subordinate to a given level is always available and the need for stubs is eliminated. The
bottom-up integration strategy may be implemented with the following steps:

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

• The low-level modules are combined into clusters into clusters that perform a specific Software
sub-function.

• A driver (i.e.) the control program for testing is written to coordinate test case input and output.
•The cluster is tested.

• Drivers are removed and clusters are combined moving upward in the program structure The
bottom-up approaches tests each module individually and then each module is module is integrated
with a main module and tested for functionality.

TESTING METHODOLOGIES
User Acceptance Testing:

User Acceptance of a system is the key factor for the success of any system. The system under
consideration is tested for user acceptance by constantly keeping in touch with the prospective
system users at the time of developing and making changes wherever required. The system
developed provides a friendly user interface that can easily be understood even by a person who is
new to the system.

Output Testing:

After performing the validation testing, the next step is output testing of the proposed system,
since no system could be useful if it does not produce the required output in the specified format.
Asking the users about the format required by them tests the outputs 72 generated or displayed by
the system under consideration. Hence the output format is considered in 2 ways – one is on screen
and another in printed format.

Validation Checking:

Validation checks are performed on the following fields.

Text Field:

The text field can contain only the number of characters lesser than or equal to its size. The text
fields are alphanumeric in some tables and alphabetic in other tables. Incorrect entry always flashes
and error message.

Numeric Field:

The numeric field can contain only numbers from 0 to 9. An entry of any character flashes an
error message. The individual modules are checked for accuracy and what it has to perform. Each
module is subjected to test run along with sample data. The individually tested modules are
integrated into a single system. Testing involves executing the real data information is used in the
program the existence of any program defect is inferred from the output. The testing should be
planned so that all the requirements are individually tested.A successful test is one that gives out the
defects for the inappropriate data and produces and output revealing the errors in the system.

Preparation of Test Data:

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

Taking various kinds of test data does the above testing. Preparation of test data plays a vital role
in the system testing. After preparing the test data the system under study is tested using that test
data. While testing the system by using test data errors are again uncovered and corrected by using
above testing steps and corrections are also noted for future use.

Using Live Test Data:

Live test data are those that are actually extracted from organization files. After a system is
partially constructed, programmers or analysts often ask users to key in a set of data from their
normal activities. Then, the systems person uses this data as a way to partially test the system. In
other instances, programmers or analysts extract a set of live data from the files and have them
entered themselves.

Using Artificial Test Data:

Artificial test data are created solely for test purposes, since they can be generated to test all
combinations of formats and values. In other words, the artificial data, which can quickly be
prepared by a data generating utility program in the information systems department, make possible
the testing of all login and control paths through the program.

User Training:

Whenever a new system is developed, user training is required to educate them about the
working of the system so that it can be put to efficient use by those for whom the system has 66
been primarily designed. For this purpose, the normal working of the project was demonstrated to
the prospective users. its working is easily understandable and since the expected users are people
who have good knowledge of computers, the use of this system is very easy.

Maintanence:

This covers a wide range of activities including correcting code and design errors. To reduce the
need for maintenance in the long run, we have more accurately defined the user’s requirements
during the process of system development. Depending on the requirements, this system has been
developed to satisfy the needs to the largest possible extent. With development in technology, it
may be possible to add many more features based on the requirements in future. The coding and
designing is simple and easy to understand which will make maintenance easier.

Testing Strategy:

A strategy for system testing integrates system test cases and design techniques into a
wellplanned series of steps that results in the successful construction of software. The testing
strategy must co-operate test planning, test case design, test execution, and the resultant data
collection and evaluation. A strategy for software testing must accommodate low-level tests that are

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

necessary to verify that a small source code segment has been correctly implemented as well as high
level tests that validate major system functions against user requirements. System Testing: Software
once validated must be combined with other system elements (e.g., Hardware, people, database).
System testing verifies that all the elements are proper and that overall system function performance
is achieved. It also tests to find discrepancies between the system and its original objective, current
specifications and system documentation.

Unit Testing:

In unit testing different are modules are tested against the specifications produced during the
design for the modules. Unit testing is essential for verification of the code produced during the
coding phase, and hence the goals to test the internal logic of the modules. Using the detailed design
description as a guide, important Conrail paths are tested to uncover errors within the boundary of
the modules

7.CONCLUSION
Human emotion recognition plays an important role in
the interpersonal relationship. ... Emotions are reflected
from speech, hand and gestures of the body and through
facial expressions. Hence extracting and understanding
of emotion has a high importance of the interaction
between human and machine communication.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

8.FUTURE SCOPE

For instance, exhaustion, frustration, anticipation,


aggressiveness and so on helps in real-time applications.
To cope with existing datasets and in a real-time
environment, compatible new techniques should
extensively develop from the baseline.

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

9.REFERENCES

 https://www.elprocus.com/image-processing-projects-for-
engineering-students/

 https://www.electronicsforu.com/electronics-
projects/software-projects-ideas/matlab-projects-ideas

 https://www.visive.ai/artificial-intelligence/face-recognition-
ai?gclid=
 https://towardsdatascience.com/face-detection-recognition-
and-emotion-detection-in-8-lines-of-code-b2ce32d4d5de

Downloaded by Abdullah Ansari (idfake0104@gmail.com)


lOMoARcPSD|33172637

THANK YOU

Downloaded by Abdullah Ansari (idfake0104@gmail.com)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy