DP 4 Report
DP 4 Report
Dissertation Report on
Submitted
in partial fulfilment of the requirements for the degree of
Master of Technology
in
Electronics
by
Miss Mulla Sabira Samad
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
CERTIFICATE
This is to certify that, Miss. Sabira Samad Mulla ( Roll No- 2 0 2 3 0 0 7 ) has success-
Cryptocurrency Price Prediction using Deep Neural Network for the partial
Date:
Supervisor
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
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.
Last but not the least; Mr. Sandip Patil my father, Mrs. Sunita Patil my mother,
constantly supported me for this work in all aspects
iv
ABSTRACT
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
viii
ABBREVIATIONS
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.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.
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
4. To develop new algorithms for price prediction and find the best result.
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
6.4 Closure
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.
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
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.
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.
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.
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
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.
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.
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.
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
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
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
3. Make sure to list one-of-a-kind things that will address missing qualities and
hold more data.
Confusion Matrix
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
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.
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.
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
32
4.5.3 Forecasting 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.
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
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)
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.
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.