0% found this document useful (0 votes)
138 views46 pages

DP 4 Report

This dissertation report describes a system for detecting driver drowsiness using computer vision techniques. The system aims to reduce road accidents caused by fatigue. It uses an algorithm to detect the driver's face, locate and track their eyes, and analyze eye closure to determine drowsiness. Deep learning and computer vision libraries like Dlib and OpenCV are used to build the system and detect drowsiness based on thresholds for eye closure duration. Results show the system can accurately detect faces and eyes to monitor driver alertness in real-time. The overall approach presents a potential module for advanced driver assistance systems to increase road safety.

Uploaded by

sabira mulla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views46 pages

DP 4 Report

This dissertation report describes a system for detecting driver drowsiness using computer vision techniques. The system aims to reduce road accidents caused by fatigue. It uses an algorithm to detect the driver's face, locate and track their eyes, and analyze eye closure to determine drowsiness. Deep learning and computer vision libraries like Dlib and OpenCV are used to build the system and detect drowsiness based on thresholds for eye closure duration. Results show the system can accurately detect faces and eyes to monitor driver alertness in real-time. The overall approach presents a potential module for advanced driver assistance systems to increase road safety.

Uploaded by

sabira mulla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 46

A

Dissertation Report on

Crypto currency Price Prediction using Deep Neural Network

Submitted
in partial fulfilment of the requirements for the degree of
Master of Technology
in
Electronics

by
Miss Mulla Sabira Samad

(Roll No. 2023007)

Under the Supervision of


Prof. Satyawan R. Jagtap

Department of Electronics and Telecommunication Engineering

K.E. Societys
Rajarambapu Institute of Technology, Rajaramnagar
(An Autonomous Institute, Affiliated to Shivaji University, Kolhapur)
2021-2022
K.E. Societys
Rajarambapu Institute of Technology, Rajaramnagar

(An Autonomous Institute, Affiliated to Shivaji University, Kolhapur)

CERTIFICATE

This is to certify that, Miss. Sabira Samad Mulla ( Roll No- 2 0 2 3 0 0 7 ) has success-

fully completed the dissertation work and submitted dissertation report on

Cryptocurrency Price Prediction using Deep Neural Network for the partial

fulfillment of the require- ment for the degree of Master of Technology in

Electronics Engineering from the Department of Electronics and telecommunication,

as per the rules and regula- tions of Rajarambapu Institute of Technology,

Rajaramnagar, Dist: Sangli.

Date:

Place: RIT, Rajaramnagar

Prof. Satyawan R. Jagtap

Supervisor

Name Dr. Mahesh S. Kumbhar

External Examiner Head of Program

Dr. Mahadev S. Patil

Head of Department PG Convener

ii
DECLARATION

I declare that this report reflects my thoughts about the subject in my own

words. I have sufficiently cited and referenced the original sources, referred or

considered in this work. I have not misrepresented or fabricated or falsified any

idea/data/fact/source in this my submission. I understand that any violation of

the above will be cause for disciplinary action by the Institute.

Place: RIT, Rajaramnagar Mulla Sabira Samad

Date: Roll No:2023007

iii
ACKNOWLEDGEMENTS
I must mention several individuals and organizations that were of enormous help
in the development of this work. Prof S. R. Jagtap. my supervisor, philosopher and
personality with a midas touch encouraged me to carry this work. His con- tinuous
invaluable knowledgeably guidance throughout the course of this study helped me
to complete the work up to this stage and hope will continue in further research.

I also very thankful to HoP, HoD for their valuable suggestions, critical exam-
ination of work during the progress, I am indebted to them.

In addition, very energetic and competitive atmosphere of the ETC and CSE
Engineering Departments had much to do with this work. I acknowledge with
thanks to faculty, teaching and non-teaching staff of the department, Central li-
brary and Colleagues.

I sincerely thank to Dr. S. S. Kulkarni, Director for supporting me to do this


work and I am very much obliged to her.

Last but not the least; Mr. Sandip Patil my father, Mrs. Sunita Patil my mother,
constantly supported me for this work in all aspects

Place: RIT, Rajaramnagar Mulla Sabira Samad


Date: Roll No:2023007

iv
ABSTRACT

Nowadays, more and more professions require long-term concentration. Drivers


must keep a close eye on the road, so they can react to sudden events immediately.
Driver fatigue often becomes a direct cause of many traffic accidents. Therefore,
there is a need to develop the systems that will detect and notify a driver of her/him
bad psychophysical condition, which could significantly reduce the number of fatigue-
related car accidents. However, the development of such systems encounters many
difficulties related to fast and proper recognition of a driver’s fatigue symptoms. One
of the technical possibilities to implement driver drowsiness detection systems is to
use the vision-based approach. The technical aspects of using the vision system to
detect a driver drowsiness are also discussed. Drowsiness and Fatigue of drivers are
amongst the significant causes of road accidents. Every year, they increase the
amounts of deaths and fatalities injuries globally. In this paper, a module for
Advanced Driver Assistance System (ADAS) is presented to reduce the number of
accidents due to drivers’ fatigue and hence increase the transportation safety;
thissystem deals with automatic driver drowsiness detection based on visual
information. We propose an algorithm to locate, track, and analyze the driver’s eyes,
ascientifically supported measure of drowsiness associated with slow eye closure.

Keywords: Drowsiness, Eye detection, Tracking, Face Detection, Euclidean Distance.

v
Contents

CERTIFICATE...............................................................................ii
DECLARATION...............................................................................iii
ACKNOWLEDGEMENTS......................................................................iv
ABSTRACT......................................................................................v
CONTENT......................................................................................vi

ABBREVIATIONS............................................................................ix

1 Introduction 1
1.1 Introduction.....................................................................................................1
1.2 Different approaches to detect drowsiness...............................................1
1.3 Aim and Objectives..................................................................................4
1.4 Layout of the Thesis.......................................................................................5
1.5 Closure.............................................................................................................5

2 Literature Review 6
2.1 Introduction.....................................................................................................6
2.2 Literature review.............................................................................................6
2.3 Closure...........................................................................................................10

3 Proposed work 12
3.1 Introduction...................................................................................................12
3.2 Developed Block Diagram......................................................................12
3.3 Flowchart of program....................................................................................14
3.4 Eye closure detection..............................................................................15
3.5 Code.......................................................................................................18
3.6 Tools and Image processing Libraries............................................................19

vi
3.6.1 Dlib...............................................................................................19
3.6.2 Python..........................................................................................19
3.6.3 OpenCv.........................................................................................20
3.7 Software Description..............................................................................20
3.7.1 Python..........................................................................................20
3.7.2 Visual Studio Code......................................................................20

4 Results 21
4.1 Methodology for testing................................................................................21
4.1.1 Face Detection...............................................................................21
4.1.2 Eye Detection................................................................................22
4.1.3 Eye Status based on threshold.......................................................23
4.2 Closure...........................................................................................................25

5 Conclusion 26
REFERENCES.........................................................................................27

vii
List of Figures

3.1 Block Diagram of the System.................................................................11


3.2 Flowchart of Algorithm of Proposed System.................................................12
3.3 Landmarks on open and closed eye 17..........................................................13
3.4 Landmarks depicted by dlib library...............................................................14
4.1 Face Detection..............................................................................................21
4.2 Multiple Face Detection 21...........................................................................22
4.3 Eye Detection and Face Landmarks Plotting.................................................22
4.4 Active Status of Eyes......................................................................................23
4.5 Drowsy status of Eyes...................................................................................24
4.6 Active Status of Eyes.....................................................................................25

viii
ABBREVIATIONS

ROI Region of Interest


NHTSA National Highway Traffic Safety Administration
WHO World Health Organization
CNN Convolutional Neural Network
RNN Recurrent Neural Net-works
WNC Wavelet Network Classifier
FWT Fast Wavelet Transform
KNN K Nearest Neighbors

ix
1
1
Chapter 1

Introduction

1.1 Introduction

Crypto currency may be a new variety of quality that has emerged as results of the
advancement of financial technology and it’s created a giant chance for researches.
Cryptocurrency worth forecasting is troublesome because of worth volatility and
dynamism. Round the world, there are a whole lot of crypto currencies that are used.
Paper [1] proposes 3 styles of perennial neural network (RNN) algorithms want to
predict the costs of 3 styles of crypto currencies, particularly Bit coin (BTC), Litcoin
(LTC), and Ethereum (ETH). The models show wonderful predictions counting on the
mean absolute share error (MAPE). Results obtained from these models show that the
gated perennial unit (GRU) performed higher in prediction for every kind of crypto
currency than the long remembering (LSTM) and Bifacial LSTM (bi-LSTM) models.
Crypto currency i.e. bit coin. The recent trend in value prediction technologies is that
the use of machine learning that makes predictions supported the values of current
value indices by coaching on their previous values. Machine learning itself employs
totally different models to create prediction easier and authentic. Our Main focuses
on the utilization of Regression and LSTM based mostly Machine learning to predict
values.

1 . 2 Techniques
Bitcoin runs on a peer-to-peer basis and is a decentralized cryptocurrency. It uses
encryption and anonymity for cryptography. Bitcoin is the top-ranking cryptocurrency
centered on the internet. The People most encounter Bitcoin due to anonymity and
transparency in the system, among the widespread cryptocurrencies available onthe
market. Bitcoin becomes popular because of its price fluctuations. Cryptocurrency has
emerged as a crucial element in companies and stock sector opportunities in the stock
industry over the last decade. The accurate and consistent forecast will help investors

1
in cryptocurrency make the right investment decisions and lead to future higher
income. Nevertheless, due to its chaotic and quite complex existence, cryptocurrency
price prediction is considered a difficult job. Correspondingly, several researchers have
examined different factors that influence the price of Bitcoin and the trends behind its
fluctuation, using a various machine learning algorithm. The most powerful and
commonly used deep learning algorithm is implemented for forecasting bitcoin prices.
The real-time dataset is collected to the current date with the Bitcoin value of Open,
Close, Low, High, Volume to and from price details. The main of the work is to use the
LSTM algorithm to extract the accurate price of Bitcoin. The results obtained provide
valuable evidence that LSTM can solve this problem efficiently and effectively.

1.2.1 Existing System


The Bitcoin is a highly cryptic and virtual currency used by many investors throughout
the world. Satoshi Nakamoto was the inventor of Bitcoins. Thus, Bitcoin is a blockchain
based currency that encompasses a public records of all the transactions performed
under monitoring. Many researchers have worked in this field to predict and analyze
the trends and patterns of the Bitcoin prices. Initially, with very less data and limited
scope in algorithms and tools the accurate representation and factual prediction of
values was difficult but with the advancements in technology and higher scopes in
domains like machine learning and deep learning researchers have been keen on
developing models that can provide an insight to the estimation of monetary values.
A literature survey that consisted of some prominent work in the respective domain
provided quite notable result [8].

1.2.2 Analysis
The term cryptocurrency refers to a type of virtual currency that is secured by an
encryption code. These are based on a decentralized system of networks which in turn
is based on 11 blockchain technology. What segregates cryptocurrencies from the
ordinary online transaction is its modus operandi.The main difference between
cryptocurrencies and the normal digital transaction is that in cryptocurrencies there
is no single or central ledger available rather the recording of the transactions is been
done by all the user participating in the system and at the same time which demises
the chances of it getting hacked. So, this answers one of the main questions that arise
when it comes to the safety and hacking of the cryptocurrency. The currencies are
1
based on a safer interface as compare to other virtual currency.

1.2.3 Pre-processing
We analyze the predictability of the bitcoin market across prediction horizons ranging
from 1 to 60 min. In various machine learning models and find that, while all models
out perform a random classifier, recurrent neural networks and gradient boosting
classifiers are especially well-suited for the examined prediction tasks. We use a
comprehensive feature set, including technical, blockchain-based, sentiment- interest-
based, and asset-based features. The technical features remain most relevant for most
methods, followed by selected blockchain-based and sentiment-interest- based
features. Additionally, we find that predictability increases for longer prediction
horizons. Although a quantile-based long-short trading strategy generates monthly
returns of up to 39% before transaction costs, it leads to negative returns after taking
transaction costs into account due to the particularly short holding periods.

1.3 Aim and Objectives


Aim

Aim is to develop a system which will analyze and forecast the crypto currencies values
of next upcoming year and displays the analysis chart to user.

Objectives
The proposed work consists of following objectives
1. To review the current literature to understand the existing methods

2. To analyze the existing methods for finding crypto currency prediction


with the Current Date.
3. To collect and train the data.

4. To develop new algorithms for price prediction and find the best result.

5. To test the accuracy of the developed algorithm using confusion Matrix.

6. To validate the results.


6.3 Layout of the Thesis

Chapter 1

1
This chapter includes general project introduction, aim and objectives of the pro-
posed work.
Chapter 2

This chapter contains literature survey of the present work and theories for the
proposed system.
Chapter 3

This chapter includes proposed work of the project, which contains the block di-
agram and simulation.
Chapter 4

This chapter shows results and discussions of the system.


Chapter 5
This chapter contains conclusions of the dissertation work.

6.4 Closure

This section portrays the need of prediction of cryptocurrency price. Different


approaches are used to predict the cryptocurrency as mentioned in the given
chapter. The necessary methods for cryptocurrency price prediction using deep
neural network are appeared in Chapter 2. The entirety of this is examined to
put it plainly, further its elaboration is finished.

1
Chapter 2

Literature Review

2.1 Introduction

The literature survey is a significant piece of any work. It provides guidance to our
research. This part gives data about alluded research papers and audit papers.
Different research papers about are alluded from the assets like IEEE, Science Direct,
Springer.

2.2 Literature review

Hitam et al. [1], proposed a machine learning (ML) may be a kind of computing that
may predict the longer term supported past information. ML- based models have
numerous blessings over alternative foretelling models as previous analysis has
shown that it not solely delivers a result that’s nearly or precisely the same because
the actual result, however it conjointly improves the accuracy of the result. Samples
of machine learning embody neural networks (NN), support vector machines (SVM),
and deep learning.
Yanuar Andrianto et al [2], proposed to demonstrate that incorporating crypto
currency into a portfolio improves its effectiveness in two ways. The primary is to cut
back the quality deviation, and therefore the second is to produce investors with
additional allocation choices. The best crypto currency allocation was reported to be
within the vary from five-hitter to twenty, betting on the risk tolerance of the
capitalist. The authors of concentrate on statistic information foretelling in particular
and apply 2 machine learning algorithms, random forests (RF) and random gradient
Boosting machine(SGBM). The results show that the ensemble technique will be wont
to anticipate Bitcoin values. The call-making method must build the suitable decision
at the correct time, reducing the risks related to the investment method. In, a hybrid

Electronics and Telecommunication Engineering Department: Electronics 16


cryptocurrency prediction system supported LSTM and GRU is bestowed, specializing
in 2 cryptocurrencies, Litecoin and Monero.

Derbentsev et al. [3], proposed a minute-sampled Bitcoin returns over three h


periods to combination RV information. a range of machine learning strategies,
together with ANN (MLP, GRU, and LSTM), SVM, and ridge regression, were
accustomed predict future values based on past samples, that area unit compared to
the heterogeneous auto-regressive realized volatility (HARRV) model with optimized
lag parameters. The findings show that the suggested system properly predicts costs
with high accuracy, indicating that the strategy may be accustomed forecast costs for
a range of crypto currencies.
Mohammad J. Hamayel et al [4], proposed a traditional support vector machine and
regression toward the mean strategies to forecast Bitcoin values. This analysis takes
into consideration a statistic prediction created from everyday Bitcoin closing costs
for the creation of Bitcoin prediction model.
Joost Verbraeken et al [5], proposed a new machine learning techniques to deal with
each a multivariate analysis technique that relies on extremely related characteristics
and a deep learning mechanism that uses a conjugate gradient mechanism in
conjunction with a linear seek for BTC worth prediction.
Deepak Kumar et al [6], proposed a value movements of Bitcoin, Ethereum, and
Ripple area unit analyzed. The authors utilize powerful computer science
frameworks, together with a totally joined artificial neural network (ANN) and an
extended STM (LSTM) perennial neural network, and they discovered that ANN
depends additional on long history, whereas LSTM depends additional on short term
dynamics, implying that LSTM is additional economical at extracting meaning info
from historical memory than ANN.

Dennys C et al [7], proposed a prediction based on Bitcoin daily worth prediction with
high-dimensional information reveals that logistical regression and linear
discriminant analysis achieve associate degree accuracy of sixty six. On the opposite
hand, surpassing (a subtle machine learning algorithm) outperforms the benchmark
results for daily worth prediction, with statistical techniques and machine learning
algorithms having the best accuracies of 66% and 65.3%, severally.

Electronics and Telecommunication Engineering Department: Electronics 17


Samiksha Marne et al. [8] attempted to predict Bitcoin prices by the use of RNN using
the LSTM model to predict the price of the cryptocurrency. The results were
computed by extrapolating graphs along with the Root Mean Square Error of the
model which was found to be 3.38. The use of RNN using the LSTM algorithm was
done effectively.

2.3 Closure

Face and Eye Detection is carried out by using different libraries like dlib, OpenCv.
Important calculation for drowsiness detection utilizing EAR is finished utilizing
normalization function. Part 3 talks about the proposed work and execution of
framework.

Electronics and Telecommunication Engineering Department: Electronics 18


Chapter 3

Proposed work

3.1 Introduction

This chapter will discuss the approach used to achieve the project’s objectives and will
take a closer look at how the project is implemented. In order to complete this
project, it will be necessary to analyse each stage. Each choice and achievement of
the method used in this project will be discussed at each level until the project is
completed. The software used in this project is the Python, Streamlit Webframe and
Anaconda Navigator. The algorithm utilized to predict the Bitcoin price is LSTM, Linear
Regression.

3.2 Developed Block Diagram

Figure 3.1: Block Diagram of the System

The figure1 shows the architecture of the proposed system. Here we have taken
datasets from yahoo finance data and feature extraction of the collected data will be
done. In feature extraction we look only at the related Volume, Close, Low, Higher

Electronics and Telecommunication Engineering Department: Electronics 19


prices, and market values.  In all data sets, if the values are found to be correct there,
it is replaced by a description of the appropriate attribute. After this, all data sets are
merged into one, according to the magnitude of the time.  If we look at the Bitcoin
price movement during year 2022, that will be transferred to the neural network.
After that data will be trained and tested to obtain trained data. , testing of data is
done and with the LSTM model we forecast the values to get prediction value. Finally
crypto currency price will be predicted with the help of trained data. In the proposed
architecture we are collecting the data from the yahoo finance. First step is to load
and train the dataset. After training of dataset testing will be done that is we will
predict the future price beyond the trained dataset.
Dataset: - Yahoo Finance. (https://www.kaggle.com/achintyatripathi/eda-
autoviz-class-one-line-code-yahoo-stock-price?scriptVersionId=42446951)

3.3 Flow Chart Of Developed Program Code:

Figure 3.2: Flowchart of Algorithm of Proposed System

Electronics and Telecommunication Engineering Department: Electronics 20


4.1 Algorithm Used

4.1.1. LSTM Algorithm

LSTMs are very powerful in sequence prediction problems because they’re able to
store past information. This is important in our case because the previous price of a
stock is crucial in predicting its future price. Long Short- Term Memory (LSTM)
networks are a modified version of recurrent neural networks, which makes it easier
to remember past data in memory. This is a behavior required in complex problem
domains like machine translation, speech recognition, and more. LSTMs are a
complex area of deep learning. It can be hard to get your hands around what LSTMs
are, and how terms like bidirectional and sequence-to-sequence relate to the field.
There are few that are better at clearly and precisely articulating both the promise of
LSTMs and how they work than the experts that developed them.

4.1.2 The internal structure of an LSTM

It works by using special gates to allow each LSTM layer to take information from
both previous layers and the current layer. The data goes through multiple gates
(like forget gate, input gate, etc.) and various activation functions (and is passed
through the LSTM cells. The main advantage of this is that it allows each LSTM cell to
remember patterns for a certain amount of time. The thing to be noted is that
LSTM can remember important information and at the same time forget irrelevant
information.

Fig 3. LSTM Architecture

LSTMs deal with both Long Term Memory (LTM) and Short Term Memory (STM) and
for making the calculations simple and effective it uses the concept of gates.

Electronics and Telecommunication Engineering Department: Electronics 21


Forget Gate: LTM goes to forget gate and it forgets information that is not useful.

Learn Gate: Event (current input) and STM are combined together so that necessary
information that we have recently learned from STM can be applied to the current
input.

Remember Gate: LTM information that we haven’t forget and STM and Event are
combined together in Remember gate which works as updated LTM.

Use Gate: This gate also uses LTM, STM, and Event to predict the output of the
current event which works as an updated STM.
4.2 LSTM Network

Bidirectional long-short term memory (bi-lstm) is the process of making any neural
network have the sequence information in both directions backwards (future to past)
or forward(past to future). In bidirectional, our input flows in two directions, making
a bi-lstm different from the regular LSTM. With the regular LSTM, we can make input
flow in one direction, either backwards or forward. However, in bi-directional, we can
make the input flow in both directions to preserve the future and the past

Fig 5. LSTM Network

information. The above result shows the bidirectional lstm result it shows the layer
outputs and pameters for per layers and in the evaluation part it displays information
like total parameters, trainable parameters, and non-trainable parameters.
4.3 Linear Regression

Electronics and Telecommunication Engineering Department: Electronics 22


The strategy for working out the connection between numerous factors is called
inversion. This sort of computation is utilized to foresee the result. In Machine
Learning, the inversion strategy is utilized to work out the progressions brought
about by free factors. It was characterized by change. These systems are significant.
You can indicate a variable. Irrelevant things independent factors are recorded
underneath. It tends to be a ton and it relies upon the change Vague Values Working
Values Definition of backwardness is called Y. Genuine qualities are supposed to
change the distinction between the qualities. is a Calculation Error.

4.4 Random forest Regression


Unlawful storehouses are classifications that contain various kinds of tree

Electronics and Telecommunication Engineering Department: Electronics 23


determination from various wellsprings of data, and it takes a ton of significant worth
to accomplish the genuine work of the laid out data. The bigger the quantity of trees
in the tree region, the better it is and the more troublesome it is to keep intact.
Changed informational collections should have not many highlights so classes can
foresee specific outcomes as opposed to anticipated outcomes. The assumptions for
each tree ought to be negligible. This requires less interest in arranging contrasted
with various models. It predicts efficiency and reality with regards to the enormous
things that have been set up that function admirably in any capacity. Without much
data, it very well might be valid. The arranged work is done in Python 3.6.4 with
scikit-learn, panda, matplotlib and other key libraries. We have eliminated the data
from bitinformatics.com with the key control key. Erased data incorporates modern
data. 80% of the pamphlet is viewed as a component of the train and 20% is viewed
as the test standard. Smart estimations have been utilized, as expected timberlands
and retreats. Quality investigation. The assault is performed on the pre-handling line,
and the expense is determined from the grades gave against the id.

RMSE (Root Mean Square Error):


Early blunder is an action that frequently utilizes the contrast between the assessed
esteem (test or populace values) of a given example or worth. RMSE is a proportion
of engendering mistake

Here is the quantity of data.fi is the response to the worth of the model and Oi is the
genuine expense of the article I

Why use Random Forest Algorithm?

1. Ordinary memory calculations can be utilized for arranging and recovery


activities.

2. Gives high uprightness and support.

3. Make sure to list one-of-a-kind things that will address missing qualities and
hold more data.

Electronics and Telecommunication Engineering Department: Electronics 24


4. Assuming there are many trees, this tree is a genuine model.

Confusion Matrix

3.4 Tools and Image Processing Libraries

Following optimized tools and image processing libraries are used for implementation
of presented algorithm.
3.6.1 DLib:
Dlib is a modern C++ toolkit containing machine learning algorithms and tools for
creating complex software in C++ to solve real world problems. Dlib is a general-
purpose cross-platform software library written in the programming language C++. Its
design is heavily influenced by ideas from design by contract and component-based

Electronics and Telecommunication Engineering Department: Electronics 25


software engineering. Thus, it is, first and foremost, a set of independent software
components. It is used in both industry and academia in a wide range of domains
including robotics, embedded devices, mobile phones, and large high performance
computing environments. Dlib's open- source licensing allows you to use it in any
application, free of charge. Open-Source Dib library is used by author for
implementationof CNN (Neural Networks). Highly optimized pre-learned facial shape
predictor and detectors functions are used by author for detection of facial
landmarks. Facial landmarks were further used for extracting eye coordinates.
3.6.2 Python:
Python is an object-oriented programming language created by Guido Rossum in
1989. It is ideally designed for rapid prototyping in the complex applications. It has
interfaces to many OS system calls and libraries and is extensible to C or C++. Many
large companies use the Python programming language include NASA, Google,
YouTube, BitTorrent, etc. Python is widely used in Artificial Intelligence, Natural
Language Generation, Neural Networks and other advanced fields of Computer
Science. Python had deep focus on code readability. Python language is used by
author due to his cross-platform compatibility as main coding language for algorithm.
Open CV and Dlib libraries are integrated in python interpreter for using readymade
optimized functions.
3.6.3 Open CV:
OpenCV (Open-source Computer Vision) is theSwiss Army knife of computer vision. It
has a wide range of modules that can help us with a lot of computer vision problems.
But perhaps the most useful part of OpenCV is its architecture and memory
management. It provides you with a framework in which you can work with images
and video in any way you want, using OpenCV’s algorithms or your own, without
worrying about allocating and reallocating memory for yourimages. Open CV libraries
and functions are highly optimized and can be used for real time image and video
processing. OPENCV’s highly optimized image processing function are used by author
for real time image processing of live video feed from camera. By using it, one can
process images and videos to identify objects, faces, or even handwriting of a
human. When it integrated with various libraries, such as NumPy, python is capable
of processing the OpenCV array structure for analysis. To Identify image pattern and

Electronics and Telecommunication Engineering Department: Electronics 26


its various features we use vector space and perform mathematical operations on
these features.

3.5Software Description

3.7.1 Python
Python is a significant level programming language used on a very basic level for
generally helpful programming. It was made in the year 1991 by Guido van Rossum. It
has a structure sanity that underlines generally on points of view, for instance, code
intelligibility and strikingly uses significant whitespace. It is a viable programming
language and is commonly used over the globe for both little and tremendous scope
programming. Python has motorized memory the board. It gives different
programming perfect models some of which are object-arranged, fundamental,
utilitarian and procedural. It is like manner has a broad and sweeping standard library.
Favorable circumstances of Python which will help us in this task are:
Python can run on any Operating System as it is stage free.
Python grammar is straightforward and simple to recollect.
Size and intricacy of the code is decreased in python when contrasted with other
programming dialects.
The prototyping process is accelerated because of the utilization of a compilerover a
mediator.
Python underpins every one of the 3-procedural programming, object-situated
programming just as useful programming and is in this manner considered extremely
proficient.
3.7.2 Visual Studio Code
Visual Studio Code is a streamlined code editor with support for development
operations like debugging, task running, and version control. It aims to provide just
the tools a developer needs for a quick code-build-debug cycle and leaves more
complex workflows to fuller featured IDEs, such as Visual Studio IDE. Visual Studio
Code is a source-code editor that can be used with a variety of programming
languages,including Java, JavaScript, Go, Node.js, Python, C++, C. Web applications
that run on the Blink layout engine.

Electronics and Telecommunication Engineering Department: Electronics 27


3.3 Closure

The entire program made in python clarified previously. The program executed
in Visual Studio Code is according to diagram appeared in Fig 3.1. The above
program shows that it is showing the status of eyes based on the threshold of
EAR value. Also, the lightening condition and spectacles not affecting too much
the output of program. Section 4 shows tests of result taken and disseminated in
various classifications.

Electronics and Telecommunication Engineering Department: Electronics 28


Chapter 4

Results
4.1 Simple Moving Average: -
4.1.1

Figure 4.1:
Face
Detection
Rolling Mean VS Standard Deviation

29
F1 Score Comparison

30
4.5.1 Raw Data Loading

Fig 5. Shows Raw Data extraction that data from dataset is loading with the till
date and generate the raw data graph. Every Crypto Currency has values of Open,
High, Low, and Close. In March 2022, we got the data as shown in above figure. The
range slider shown above shows the graph of year vs. volume. The range slider is
developed by using the data collected from yahoo data finance. We collected tick
data by Web scraper that pulled data from the APIs of the Finance crypto currency
exchange from march 13, 2022 to January 17, 2023, obtaining roughly 50,000
unique trading records including Price, Trading Volume, Open, Close, High, and Low
points for use in our modeling.
31
Fig 6. Raw Data

4.5.2 Forecast Data

Fig 7. Forecast Data (segmented image)

32
4.5.3 Forecasting Plot

Fig 8. Forecast Plot

In July 2021, we got the data as shown in figure 7. The data collected from yahoo finace is
trend, yhat_lower, yhat_upper, trend_upper and lower. The range slider shown above Fig 7 is
the graph of day’s vs volume. The range slider is developed by using the data collected from
yahoo data finance shows the forecasting plot with the next 365 days values means it will
predict the values with for every month values will increase or decrease.

4.5.4 Forecasting Component


Fig 8. illustrates the distribution of the Bitcoin price yearly, weekly and monthly respectively.
We can observe moderate growth during the period of January 2013 to January 2023 and a
rapid rise to a peak at the beginning of 2022, which is the price turning point. We ordered
multiple frequency Bit coin price datasets and used the first 75% for training and the
remaining 25% for testing.
Fig 9. Forecast Plot

4.5.5 Validation Result


Price predicted for 30may 2022 by the proposed algorithm is 29,443.3657 cryptovcurrency as
shown in fig 10. and actual price in the market on the same day is 24,62,109 as shown in fig
11. this shows that results of the proposed algorithm are closely matching with the actual real
time results

Fig 10. Raw Data


Fig 11. Historical Data
Chapter 5

Conclusion

This project tells how to build a drowsiness detector using OpenCV, Python, and Dlib
opensource Libraries. The first step in building a blink detector is to perform facial
landmark detection to localize the eyes in a given frame from a video stream. The eye
aspect ratio for each eye can be calculated using Euclidian distance functions of OPEN CV,
which is a singular value, relating the distances between the vertical eye landmark points
to the distances between the horizontal landmark points. Once the eye aspect ratio
calculated, algorithm can threshold it to determine if a person is blinking the eye aspect
ratio will remain approximately constant when the eyes are open and then will rapidly
approach zero during a blink, then increase again as the eye opens. The duration of blink
further provide estimation of microsleep. The proposed algorithm has been tested on
personal car driver for testing purposes. For authentic results, the camera position was
focused on the driver’s face. Further, the algorithm has been tested in day time driving and
Night time using IR camera. The results are discussed in Result section and found
satisfactory. The proposed algorithm focused solely on using the eye aspect ratio as a
quantitative metric to determine if a person has blinked in a video stream. However, due
to noise in a video stream, subpar facial landmark detections, or fast changes in viewing
angle, a simple threshold on the eye aspect ratio could produce a false-positive detection,
reporting that a blink had taken place when in reality the person had not blinked. To make
detector more accurate high resolution camera module and fine tuning can be used.

26
REFERENCES

1. R. Jabbar, M. Shinoy, M. Kharbeche, K. Al-Khalifa,M. Krichen, and K. Barkaoui, “Driver


drowsiness detection model using convolutional neural networks techniques for android
application,” in 2020 IEEE International Conference on Informatics, IoT, and Enabling
Technologies (ICIoT), IEEE, 2020.

2. R. Sanyal and K. Chakrabarty, “Two stream deep convolutional neural network for eye state
recognition and blink detec- tion,” in 2019 3rd International Conference on Electronics,
Materials Engineering & Nano-Technology (IEMENTech), pp. 1– 8, Kolkata, India, 2019.

3. K. Saleh, M. Hossny, and S. Nahavandi, “Driving behavior classification based on sensor data
fusion using lstm recurrent neural networks,” in 2017 IEEE 20th International Conference
on Intelligent Transportation Systems (ITSC), pp. 1–7, IEEE,2017.

4. Md. Milon Islam Ashikur Rahaman and Md. Rashedul Islam., "Development of Smart
Healthcare Monitoring System in IoT Environment," Springer Nature Journal, received: 13
May 2020 / Accepted: 14 May 2020 / Published online: 26 May 2020.

5. Assari, M. A., & Rahmati, M. (2011). Driver drowsiness detection using face expression
recognition. 2011 IEEE International Conference on Signal and Image Processing
Applications (ICSIPA)

6. S. Vitabile, A. De Paola, and F. Sorbello, “A real-time non- intrusive fpga-based drowsiness


detection system,” Journal of Ambient Intelligence and Humanized Computing, vol. 2, no. 4,
pp. 251–262, 2011.

7. S. Navaneethan, N. Nandhagopal, and V. Nivedita, “An FPGA-based real-time human eye


pupil detection system using E2V smart camera,” Journal of Computational and Theoretical
Nanoscience, vol. 16, no. 2, pp. 649–654, 2019.

8. O. Jemai, I. Teyeb, and T. Bouchrika, “A novel approach for drowsy driver detection using
eyes recognition system based on wavelet network,” International Journal of Recent
Contributions from Engineering, Science & IT, vol. 1, no. 1, pp. 46–52, 2013.

9. M. Babaeian, K. A. Francis, K. Dajani, and M. Mozumdar, “Real-time driver drowsiness


detection using wavelet trans- form and ensemble logistic regression,” International
Journal of Intelligent Transportation Systems Research, vol. 17, no. 3, pp. 212–222, 2019.

10. M. Saradadevi and P. Bajaj, "Driver fatigue detection using mouth and yawning analysis,"
IJCSNS International Journal of Computer Science and Network Security, vol. 8, pp. 183-
188, 2008.

11. Knapik, M.; Cyganek, B. Driver’s fatigue recognition based on yawn detection in thermal
images. Neurocomputing 2019, 338, 274–292.

12. Alioua, N.; Amine, A.; Rziza, M.; Aboutajdine, D. Driver’s fatigue and drowsiness detection
to reduce traffic accidents on road. In Proceedings of the International Conference on
Computer Analysis of Images and Patterns, Seville, Spain, 29–31 August 2011; pp. 397–404

13. Tayab Khan, M., Anwar, H., Ullah, F., Ur Rehman, A., Ullah, R., Iqbal, A., … Kwak, K. S.
(2019). Smart Real-Time Video Surveillance Platform for Drowsiness Detection Based on
Eyelid Closure. Wireless Communications and Mobile Computing, 2019.

14. Maior, C.B.S.; das Chagas Moura, M.J.; Santana, J.M.M.; Lins, I.D. Real-time classification for
autonomous drowsiness detection using eye aspect ratio. Expert Syst. Appl. 2020, 158,
113505.

15. Zandi, A.S.; Quddus, A.; Prest, L.; Comeau, F.J. Non-intrusive detection of drowsy driving
based on eye tracking data. Transp. Res. Rec. 2019, 2673, 247–257.

16. Celecia, A.; Figueiredo, K.; Vellasco, M.; González, R. A portable fuzzy driver drowsiness
estimation system. Sensors 2020, 20, 4093.

17. Sagonas, C.; Tzimiropoulos, G.; Zafeiriou, S.; Pantic, M. 300 faces in-the-wild challenge: The
first facial landmark localization challenge. In Proceedings of the IEEE International
Conference on Computer Vision Workshops, Sydney, Australia, 2–8 December 2013; pp.
397–403. 54.

18. Khunpisuth, O.; Chotchinasri, T.; Koschakosai, V.; Hnoohom, N. Driver drowsiness detection
using eye-closeness detection. In Proceedings of the 2016 12th International Conference on
Signal-Image Technology & Internet-Based Systems (SITIS), Naples, Italy, 28 November–1
December 2016; pp. 661–668.
19. S. Arefnezhad, S. Samiee, A. Eichberger, and A. Nahvi, “Driver drowsiness detection based
on steering wheel data applying adaptive neuro-fuzzy feature selection,” Sensors, vol. 19,
no. 4, p. 943, 2019.

20. K. Mutya, J. Shah, A. D. McDonald, and J. Jefferson, “What are steering pictures are worth?
using image-based steering features to detect drowsiness on rural roads,” Proceedings of
the Human Factors and Ergonomics Society Annual Meeting, Vol. 63, no. 1, pp. 2041–2045,
2019.

21. Leng, L.B.; Giin, L.B.; Chung, W.-Y. Wearable driver drowsiness detection system based on
biomedical and motion sensors. In Proceedings of the 2015 IEEE SENSORS, Busan, Korea, 1–
4 November 2015; pp. 1–4.

22. McDonald, A.D.; Schwarz, C.; Lee, J.D.; Brown, T.L. Real-time detection of drowsiness
related lane departures using steering wheel angle. In Proceedings of the Human Factors
and Ergonomics Society Annual Meeting, Boston, MA, USA, 22–26 October 2012; pp. 2201–
2205.

23. U. Budak, V. Bajaj, Y. Akbulut, O. Atila, and A. Sengur, “Aneffective hybrid model for EEG-
based drowsiness detection,” IEEE Sensors Journal, vol. 19, no. 17, pp. 7624–7631, 2019.

24. Hayawi and J. Waleed, “Driver's drowsiness monitoring and alarming auto system based on
EOG signals,” in 2019 2nd International Conference on Engineering Technology and its
Applications (IICETA), pp. 214–218, IEEE, 2019.

25. D. Artanto, M. P. Sulistyanto, I. D. Pranowo, and E. E. Pra- mesta, “Drowsiness detection


system based on eye-closure using a low-cost EMG and ESP 8266,” in 2017 2nd
International conferences on Information Technology, Information Systems and Electrical
Engineering (ICITISEE), pp. 235–238, IEEE, 2017.
6
Pain Intensity Estimation using EMG Signal

Electronics and Telecommunication Engineering Department: Electronics 7


Pain Intensity Estimation using EMG Signal

Electronics and Telecommunication Engineering Department: Electronics 8


Electronics and Telecommunication Engineering Department: Electronics 13
Electronics and Telecommunication Engineering Department: Electronics 14
Pain Intensity Estimation using EMG Signal

normal and pain patient.

Electronics and Telecommunication Engineering Department: Electronics 15


16

You might also like