You are on page 1of 36

DIGITAL TRADING

SYSTEM
(Facial Recognition System)

By

AHMED HASSAN 2019-GCUF-069072


MUHAMMAD Kashif Ali 2019-GCUF-069074
MEESAM ABBAS ASGHAR 2019-GCUF-069079

BACHELOR OF
SCIENCE IN
COMPUTER SCIENCE

DEPARTMENT OF COMPUTER SCIENCE


Government College University Faisalabad
Table of Contents
Chapter 1..............................................................................................................................................0
Introduction.........................................................................................................................................0
1 Introduction.................................................................................................................................1
1.1 Brief.......................................................................................................................................1
1.2 Relevance to course module..................................................................................................1
1.3 Project Background...............................................................................................................1
1.4 Literature Review..................................................................................................................2
1.5 Methodology and Software Lifecycle....................................................................................3
Chapter 2..............................................................................................................................................5
Problem Definition..............................................................................................................................5
2 Problem Definition......................................................................................................................6
2.1 Problem statement.................................................................................................................6
2.2 Deliverables and Development Requirements.......................................................................6
2.3 Current System:.....................................................................................................................6
Chapter 3..............................................................................................................................................7
Requirement Analysis.........................................................................................................................7
3 Requirement Analysis.................................................................................................................8
3.1 Use Case Diagram..................................................................................................................8
3.1.1 Use Case Description.....................................................................................................8
3.2 Use Case Diagram..................................................................................................................9
3.2.1 Use Case Description.....................................................................................................9
3.3 Use Case Diagram................................................................................................................10
3.3.1 Use Case Description...................................................................................................10
3.4 Use Case Diagram................................................................................................................11
3.4.1 Use Case Description...................................................................................................11
3.5 Use Case Diagram................................................................................................................12
3.5.1 Use Case Description...................................................................................................12
3.6 Use Case Diagram................................................................................................................13
3.6.1 Use Case Description...................................................................................................13
3.7 Functional Requirements.....................................................................................................14
3.7.1 Admin...........................................................................................................................14
3.7.2 Seller............................................................................................................................14
3.7.3 Buyer............................................................................................................................14
3.7.4 Facial Verification.........................................................................................................14
3.7.5 Order placement..........................................................................................................14
3.7.6 Product Recommendation...........................................................................................14
3.8 Non-Functional Requirements.............................................................................................14
3.8.1 Usability.......................................................................................................................14
3.8.2 Reliability.....................................................................................................................15
3.8.3 Safety...........................................................................................................................15
3.8.4 Security........................................................................................................................15
3.8.5 Portability....................................................................................................................15
3.8.6 Performance................................................................................................................15
Chapter 4............................................................................................................................................16
Design and Architecture...................................................................................................................16
4 Design and Architecture............................................................................................................17
4.1 System Architecture:............................................................................................................17
4.2 Data representation:.............................................................................................................17
4.3 Process Flow/Representation:..............................................................................................18
4.4 ER Diagram:........................................................................................................................19
4.5 Design Models:....................................................................................................................20
Chapter 5............................................................................................................................................21
Implementation..................................................................................................................................21
5 Implementation..........................................................................................................................22
5.1 Algorithm:...........................................................................................................................22
5.2 User Interface......................................................................................................................22
Chapter 6............................................................................................................................................23
Testing and Evaluation.....................................................................................................................23
6 Testing and Evaluation..............................................................................................................24
6.1 System Testing:...................................................................................................................24
6.2 Unit Testing:........................................................................................................................24
6.3 Functional Testing:..............................................................................................................25
6.4 Integration testing:...............................................................................................................26
Chapter 7............................................................................................................................................27
Conclusion and Future Work...........................................................................................................27
7 Conclusion and Future Work...................................................................................................28
7.1 Conclusion:..........................................................................................................................28
7.2 Future Work:........................................................................................................................28
Reference............................................................................................................................................29
Appendix............................................................................................................................................30
List of Figures

Figure 1: Face scanning...........................................................................................................................2


Figure 2: Agile Model..............................................................................................................................3
Figure 3: Profile verification use case.....................................................................................................7
Figure 4: Product flow use case...............................................................................................................8
Figure 5: Database storage use case........................................................................................................9
Figure 6: View History use case............................................................................................................10
Figure 7: Manage User use case............................................................................................................11
Figure 8: Manage Seller use case..........................................................................................................12
Figure 9: Sequence Diagram..................................................................................................................16
Figure 10: Class Diagram......................................................................................................................17
Figure 11:Flow process for Facial verification......................................................................................18
Figure 12: Flow process of project........................................................................................................18
Figure 13: ER Diagram..........................................................................................................................19
Figure 14: Incrimental Model................................................................................................................20
List of Tables

Table 1: Profile verification use case.....................................................................................................7


Table 2: Product Flow use case..............................................................................................................8
Table 3: Database storage use case.......................................................................................................9
Table 4: History use case.....................................................................................................................10
Table 5: Manage User use case...........................................................................................................11
Table 6: Manage Seller use case.........................................................................................................12
Table 7:Unit Testing 1..........................................................................................................................29
Table 8: Unit Testing 2.........................................................................................................................29
Table 9: Unit Testing 3........................................................................................................................30
Table 10: Functional Testing 1............................................................................................................30
Table 11: Functional Testing 2............................................................................................................31
Table 12: Integration Testing...............................................................................................................31
Chapter 1
Introduction
1 Introduction
A facial recognition system is a technology capable of matching a human face from a digital
image or a video frame against a database of faces. Such a system is typically employed to
authenticate users through ID verification services, and works by pinpointing and measuring
facial features from a given image.

1.1 Brief
Development began on similar systems in the 1960s, beginning as a form of computer
application. Since their inception, facial recognition systems have seen wider uses in recent times
on smartphones and in other forms of technology, such as robotics. Because computerized facial
recognition involves the measurement of a human's physiological characteristics, facial
recognition systems are categorized as biometrics. Although the accuracy of facial recognition
systems as a biometric technology is lower than iris recognition and fingerprint recognition, it is
widely adopted due to its contactless process.[3] Facial recognition systems have been deployed
in advanced human–computer interaction, video surveillance and automatic indexing of images.

1.2 Relevance to course module


This project is web based. It uses HTML, CSS, Bootstrap, JS, AJAX which we studied in the
course Web Technologies, then there is the backend which is applied with the help PHP, Python
MYSQL which we learned in Machine Learning and Database course then there is the CNN
Model which we studied in Machine Learning and Computer Vision Course.

1.3 Project Background


For a human to work non-stop, it can decrease the accuracy and decision capability of a human
but a machine that is on the accuracy standard is right every time. The scope of this proposed
system is to save time. There is no need for sellers and management team to work manually for
verification purpose they can use application after just submit some documents and live picture.
Data initiation is achieved using MySQL for database development, front-end with HTML, CSS,
JavaScript, and Bootstrap that wills make it easy to process simultaneously.

1
Abbreviations
CNN Convolution Neural Network
ML Machine Learning
CV Computer Vision
HTML Hyper Text Markup Language
CSS Cascading Style Sheet
JS JavaScript
Ajax Asynchronous JavaScript And XML

1.4 Literature Review


A person’s identification in a bank is accomplished by an officer comparing a photo in an ID
card with the actual face of the person. This process is prone to mistake as officers usually need
to serve several people in a short time. This article proposes the personal verification system
using an ID card and face photo by applying face detection and face comparison. A system based
on several open-source libraries for face recognition including Dlib, Face net, and Arc Face is
implemented. The experimental analysis shows that the system based on ArcFace yields the
highest accuracy at 99.06% for face detection and 96.09% for face comparison. ArcFace
outperforms other methods because it not only uses MTCNN but also adjusts face image to be in
a straight direction as well as fixes the positions of eyebrows, eyes nose, and mouth so that all
images have similar references.

2
Figure 1: Face scanning

1.5 Methodology and Software Lifecycle


I have created front end of our website application by using HTML, CSS, JavaScript, and
Bootstrap and Computer vision model is deployed in Ajax (JS frame-work), PHP and python.
Data initiation is achieved using MySQL for database development.

Computer Vision model is used in my project to recognize the facial from photo and id card. I
have checked the accuracy by applying data of different user identities on Convolution Neural
Network (CNN) for image classification.

SDLC model used:

The Incremental model has been used in the construction of this project because in each phase
of the project, it is analyzed, designed, implemented, and further tested until the product is
finished. Many developmental cycles are possible, and these cycles are divided into very small
modules. Typically, software that works with the add-on model is produced during the first
module. Each subsequent module release can add function to the previous release. In a growing
model, the process continues until a complete system is achieved. Therefore, this model is much
more flexible compared to other models of System Development Life Cycle when conducting a
screening and treatment program. This is how it will be easier for every member to complete
their designated modules and is flexible to merge all the iterations. This methodology is more
useful in web applications and task-based companies.

3
Figure 2: Agile Model

4
Chapter 2
Problem Definition

5
2 Problem Definition
2.1 Problem statement
As we all know the world is moving faster towards online purchasing and selling platforms For
example Now a days Americans 70% purchase is from online platforms, The retailer also move
on those famous platforms like amazon , But the main problem is here for the profile verification
for new seller , the websites took more than a couple of weeks to verify their profile through
video call, Here we are going to develop a platform through which seller can verify their profile
from live video using deep learning in minutes instead of days.

2.2 Deliverables and Development Requirements


Deliverables:

We have created a website named as Digital Trading System. The website has:

 Proper Sign up and sign in functionality


 Seller will have auto facial verification just in minutes
 Sell and purchase
 Admin can also manage and review every possible activity
 Guideline for the user, who wants to achieve proper products.
Development Requirements:

Website must have the following requirements:

 Account creation and login functionality


 Feature for uploading selfie-photo and id card picture for prediction
 Facial verification with Computer Vision Model
 Order processing
 Product handling
2.3 Current System:
The current system is a web-based application which can verify seller profile through facial
recognition process. The website has a login/signup system for seller and user and admin to
control this system according to their functionalities.

6
Chapter 3
Requirement Analysis

7
3 Requirement Analysis
3.1 Use Case Diagram

Figure 3: Profile verification use case

3.1.1 Use Case Description

The table below indicates a comprehensive use case template filled in with an example
drawn from the Seller profile verification.

Table 1: Profile verification use case

Use Case ID: UC1


Use Case Name: Profile verification
Actors: Primary Actor: Trader/Seller Secondary Actor: Admin/Management
Description: I f any seller want to sell their product in this market they have to
complete their verification first.
Trigger: No need to wait for days to verification just single click to start their
verification
Preconditions: Internet Connection is mandatory, Login to system
Post conditions: Allocate appointment slip or online status of appointment to Seller.
Normal Flow: Our Ai will make decision after verification and compare a lot of feature
that either profile is acceptable or not.
Exceptions: The Seller comes after the verification completion.

8
3.2 Use Case Diagram

Figure 4: Product flow use case

3.2.1 Use Case Description

The table below indicates a comprehensive use case template filled in with an example
drawn from the Order placement flow.

Table 2: Product Flow use case

Use Case ID: UC2


Use Case Name: Product Flow
Actors: Primary Actor: User, Seller Secondary Actor: Admin
Description: After adding or purchasing the products admin can review and view
their data any time.
Trigger: This will help the market to make more secure and effective
Preconditions: Internet Connection is mandatory, Login to system
Post conditions: Allocate the best options for both seller and buyers
Normal Flow: Login to system.
Select Product.
Select Recommendation.
Register Proceed to checkout.
Review data.
Exceptions: Register Buyer ,seller and search products.

9
3.3 Use Case Diagram

Figure 5: Database storage use case

3.3.1 Use Case Description

The table below indicates a comprehensive use case template filled in with an example
drawn from the Database Storage.

Table 3: Database storage use case

Use Case ID: UC3


Use Case Name: Database Storage
Actors: Primary Actor: Admin Secondary Actor: Buyer, Seller
Description: All data and activities will be store in data base for security purpose and
better revision
Trigger: Admin can access data to manipulate the wrong orders and misguide
products etc
Preconditions: Internet Connection is mandatory, Login to system.
Post conditions: Allocate data to users.
Normal Flow: Flow of storage
Exceptions: No data access without database.

10
3.4 Use Case Diagram

Figure 6: View History use case

3.4.1 Use Case Description

The table below indicates a comprehensive use case template filled in with an example
drawn from the Give prescription.

Table 4: History use case

Use Case ID: UC4


Use Case Name: History
Actors: Primary Actor: Admin Secondary Actor: Seller,Buyer
Description: Connection between user and buyer and admin to review data.
Trigger: For better performance and fast access both user and buyer can see
order history
Preconditions: Internet Connection is mandatory, Login to system.
Post conditions: Give record of orders.
Normal Flow: Login to system.
Select data range.
Select types.
Record ordered.
Exceptions: Wrong date selection.

11
3.5 Use Case Diagram

Figure 7: Manage User use case

3.5.1 Use Case Description

The table below indicates a comprehensive use case template filled in with an example
drawn from the view User record.
Table 5: Manage User use case

Use Case ID: UC5


Use Case Name: Manage User
Actors: Primary Actor: Admin Secondary Actor: User
Description: Admin can manipulate the data in any worse case time forgot password,
illegal activities.
Trigger: Management can hold on user profile for make their platform secure
from fraud
Preconditions: Internet Connection is mandatory, Login to system.
Post conditions: Get control on record.
Normal Flow: Login
Edit
View
Block
Exceptions: Wrong id.

12
3.6 Use Case Diagram

Figure 8: Manage Seller use case

3.6.1 Use Case Description

The table below indicates a comprehensive use case template filled in with an example
drawn from the manage users.
Table 6: Manage Seller use case

Use Case ID: UC6


Use Case Name: Manage Seller
Actors: Primary Actor: Admin Secondary Actor: Seller
Description: Admin can manipulate the data in any worse case time forgot password,
illegal activities.
Trigger: Management can hold on user profile for make their platform secure
from fraud
Preconditions: Internet Connection is mandatory, Login to system.
Post conditions: Get control on record.
Normal Flow: Login
Edit
View
Block
Exceptions: Wrong id.

13
3.7 Functional Requirements
This system has following functional requirements:

 Admin
 Seller/Trader
 User/Buyer
 Facial Verification
 Order placement
 Product Recommendation
 Comparison

3.7.1 Admin
Admin management module provides human resource management. It refreshes the job
description of employees, revives the structure of the Club, keeps track of employment records.

3.7.2 Seller
It can be used to register them, view the data of the Placed Orders, update status of orders, and
check the orders history and their profile ranks.

3.7.3 Buyer
It can be used to register them, view the data of the Placed Orders, update status of orders, and
check the orders history, search and get recommendation for products.

3.7.4 Facial Verification


This module work as AI to verify the seller profile from live video and CNIC picture.

3.7.5 Order placement


It is used to control the order placement flow. It can be used to verify the payment from customer
and delivery to customer via API’s.

3.7.6 Product Recommendation


DTS contains a list of drugs that are commonly used for Daily routine households. Keeps a
record of each user’s purchasing used during their recommendation

3.8 Non-Functional Requirements


3.8.1 Usability
The system will help in saving time and improving efficiency. We describe the functionality of
the system by using different icons that non-technical person can easily use.

14
3.8.2 Reliability
Reliability is the level to which the software system reliably performs the specified functions
without failure. The system is reliable in that it performs the decision with confirmation of the
test.

3.8.3 Safety
The database may get crashed at any certain time due to virus or operating system failure.
Therefore, it is required to take the database backup.

3.8.4 Security
This system allows only authorized members to do administrative tasks. The system wouldn’t
allow unauthorized users to enter the system; this action will maintain and improve the
system's security level. This system had strong security to protect itself from any external
threats.

3.8.5 Portability
Portability is the ease with which a computer software program system can be transported
from its current hardware or software environment to another environment. This system works
on different platforms with full portability.

3.8.6 Performance
This system performs all the tasks very correctly and provides the results quickly and
accurately.

15
Chapter 4
Design and Architecture

16
4 Design and Architecture
4.1 System Architecture:
The structure of the system explains the working of the system and describes the components of the
project, their relationships, and how they interact with each other, with this architecture.

4.2 Data representation:


Sequence Diagram:

Figure 9: Sequence Diagram

17
4.3 Process Flow/Representation:

Figure 10:Flow process for Facial verification

Figure 11: Flow process of project

18
4.4 ER Diagram:

Figure 112: Entity Relationship Diagram

19
4.5 Design Models:
SDLC model used:

The Incremental model has been used in the construction of this project because in each
phase of the project, it is analyzed, designed, implemented, and further tested until the
product is finished. Many developmental cycles are possible, and these cycles are divided
into very small modules. Typically, software that works with the add-on model is produced
during the first module. Each subsequent module release can add function to the previous
release. In a growing model, the process continues until a complete system is achieved.
Therefore, this model is much more flexible compared to other models of System
Development Life Cycle when conducting a screening and treatment program. This is how it
will be easier for every member to complete their designated modules and is flexible to
merge all the iterations. This methodology is more useful in web applications and task-based
companies.

Figure 14: Incremental Model

20
Chapter 5
Implementation

21
5 Implementation
Implementation is done through website platform. Front end is in HTML, CSS, Bootstrap and
CNN Computer Vision Model is used, and all is connected with PHP AJAX,
python(Backend).

5.1 Algorithm:
 Signup/Login or go to home page.
 Can access image data, profiles, live well or contact us pages.

 Click “Test” button.


 Report is displayed.
5.2 User Interface
The system design is simple and easy to use. Users can easily navigate to the buttons. There
is a user-friendly GUI. Users can easily login in website and buy product from our website.

22
Chapter 6
Testing and Evaluation

23
6 Testing and Evaluation
6.1 System Testing:
Once the system has been successfully developed, testing has to be performed to ensure that the
system working as intended. This is also to check that the system meets the requirements stated
earlier. Besides that, system testing will help in finding the errors that may be hidden from the user.
There are few types of testing which includes the unit testing, functional testing and integration
testing. The testing must be completed before it is being deploy for user to use.

6.2 Unit Testing:


Unit Testing 1: Signup as a user

Testing Objective: To ensure the Signup form is working correctly

Table 7:Unit Testing 1

No. Test case/Test Script Attribute and Expected result Result


values
1 Verify user signup after Username: Aqib Successfully signup Pass
click on the “signup” Email: as a user and now
button on signup form aqib@gmail.com can login into the
with correct input data Password: ******** website.

Unit Testing 2: Login as a user

Testing Objective: To ensure the Login form is working correctly

Table 8: Unit Testing 2

No Test case/Test Script Attribute and Expected result Result


. values
1 Verify user login after Username: aqib Successfully log Pass
click on the “Login” Password: ******** into the main page
button on login form of the system as
with correct input data user.

24
Unit Testing 3: Upload image

Testing Objective: To ensure that testing for facial verification works.

Table 9: Unit Testing 3

No Test case/Test Script Attribute and Expected result Result


. values
1 Verify image upload Id card image &user Image successfully Pass
after click on the “test” profile uploaded.
button on “verification”
form with correct input
data
2 Verify image upload Id card image &user Image successfully Pass
with two different profile uploaded but on
people data after click prediction it gives
on the “verification” false value.
form with in-correct
input data
3 Verify that result is Id card image &user Result is Pass
given from image profile successfully
upload. displayed on form.

6.3 Functional Testing:


Functional Testing 1: Login with different roles

Objective: To ensure that the correct page with the correct navigation bar is loaded.

Table 10: Functional Testing 1

No. Test case/Test Script Attribute and Expected result Result


values
1 Login as an “Ordinary Username: sajawal Main page for the Pass
User” member. Password: ******** Ordinary user is
loaded with the user
navigation bar
2 Each button loads the Correct tabs opened Pass

25
correct tab. for the specific
buttons
3 Verify that “facial Upload image tab is Pass
recognition” takes to loaded.
upload image page.

Functional Testing 2: Choose File uploads image.

Objective: To ensure that the images are uploaded.

Table 11: Functional Testing 2

No Test case/Test Script Attribute and Expected result Result


. values
1 Verify that upload Test image Pass
feature uploads the test successfully
image. uploaded.

6.4 Integration testing:


Table 12: Integration Testing

No Test case/Test Script Attribute and Expected result Result


. values
1 Login as “user” member Username: sajawal Login successful Pass
Password: ******** and the home page
with its navigation
bar is loaded.
2 Upload image to check File successfully Pass
for tumor. uploaded and
outputs the result for
the image.
3 View articles. The articles are Pass
shown on the
screen.

26
Chapter 7
Conclusion and Future Work

27
7 Conclusion and Future Work
7.1 Conclusion:
At the end of this research project, we will get a system that will be a more efficient and time saving
product for people. We will get an efficient working methodology for using modern technological
concepts in building a Digital Trading System. We hope that at the end of the project users will easily
search our platform according to their choice. The findings from this system inspire motivations to
carry out further research to develop an enhanced version of the proposed system .

7.2 Future Work:


 Selfie through camera and recognize either image is real or fake
 We will buy a domain for this website and deploy it on the internet
 Application for Android and Windows
 Complete data of previous tests
 Profile editing and customization options
 Payment Gateway

28
Reference

 bezoz, J. (1994). Ecomerce TOP Rated. Site. Retrieved 2022, from


https://www.amazon.com/
 bezoz, J. (1994). Ecomerce TOP Rated. Site. Retrieved 2022, from
https://sellercentral.amazon.com/
 geeksforgeeks. (n.d.). Retrieved from geeksforgeeks:
https://www.geeksforgeeks.org/software-engineering-incremental-process-model/
 White, D. (2014, August 18). Passport Officers’ Errors in Face Matching. PLOS ONE.
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0103510
 Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception
architecture for computer vision. In: IEEE CVPR 2016: Computer Vision and Pattern
Recognition (2016)
 Christian Szegedy, C., Liu, W., Jia, Y., Sermanet, P., Reed, S., Anguelov, D., Erhan, D.,
Vanhoucke, V., Rabinovih, R.: Going Deeper with Convolutions (arXiv.org) (2015)

29
Appendix
1) A book of Computer Vision: Algorithms and Applications Richard Szeliski (September
3, 2010)
2) Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception
architecture for computer vision. In: IEEE CVPR 2016: Computer Vision and Pattern
Recognition (2016)

30

You might also like