Deep CNN Model To Detect Parkinson
Deep CNN Model To Detect Parkinson
I
CONTENTS
LIST OF FIGURES
II
CHAPTER 10 - RESULTS AND DISCUSSIONS 42-48
10.1 Implementation Description
10.2 Result Description
CHAPTER 11 - CONCLUSION AND FUTURE WORK 49
III
LIST OF FIGURES
6.12 Editor 30
IV
10.1 Sample spiral drawings from healthy Patients 43
V
CHAPTER 1
INTRODUCTION
1.1 Overview:
Parkinson’s disease (PD) manifests as the death of dopaminergic neurons in the substantia nigra
pars compacta within the midbrain. This neurodegeneration leads to a range of symptoms including
coordination issues, bradykinesia, vocal changes, and rigidity. Dysarthria is also observed in PD
patients; it is characterized by weakness, paralysis, and lack of coordination in the motor-speech
system: affecting respiration, phonation, articulation, and prosody. Since symptoms and the disease
course vary, PD is often not diagnosed for many years. Therefore, there is a need for more sensitive
diagnostic tools for PD detection because, as the disease progresses, more symptoms arise that
make PD harder to treat. The main deficits of PD speech are loss of intensity, monotony of pitch
and loudness, reduced stress, inappropriate silences, short rushes of speech, variable rate, imprecise
consonant articulation, and harsh and breathy voice (dysphonia). The range of voice related
symptoms is promising for a potential detection tool because recording voice data is non-invasive
and can be done easily with mobile devices.
PD is one of the most chronic neurodegenerative diseases in today’s world as it effects of the -year-
old. PD is a prototypical movement disorder, and primary symptoms of PD are tremor, rigidity or
muscle stiffness, bradykinesia and postural instability and these symptoms are generally known as
Parkinsonism Syndrome. Parkinson’s disease (PD) is a chronic neurodegenerative disease of that
predominantly affects the elderly in today’s world. For the diagnosis of the early stages of PD,
effective and powerful automated techniques are needed by recent enabling technologies as a tool.
Deep learning (DL) algorithms based on various diagnostic methodologies have been developed to
detect PD and resolve related diagnostic issues. This research study offers a complete assessment of
published surveys and DL-based diagnosis methodologies for PD recognition. The techniques of
DL-based diagnostic approaches for PD recognition, such as PD dataset pre-processing, extraction
and selection of features, and classification, are all included in this survey.
1
In recent years, there has been a significant increase in the use of machine learning based computer-
aided diagnosis (CAD) systems to diagnose diseases, sometimes even in early stages. There has also
been an increase in utilization of such CAD systems for diagnosing PD from various modalities like
speech signals, gait signals, magnetic resonance imaging (MRI), positron emission tomography
(PET), single-photon emission computed tomography (SPECT), Dopamine Transporter Scan (DaT
Scan), tremor signal, handwriting signal, handwritten images, and various other clinical features
(CF).
2
CHAPTER 2
LITERATURE SURVEY
Haq et al. [1] discussed the various datasets used to evaluate the suggested PD recognition
algorithms to better understand these datasets. The model evaluation metrics and cross-validation
techniques used by different studies in this domain have also been explored in this survey.
Considering the evaluated literature, this work also examined hot upcoming research issues and
related solutions. Finally, this work came up with several trends and areas for future study that will
aid progress in automatic disease recognition, particularly in detecting Parkinson’s disease and its
implementation in E-healthcare systems.
Clayton et al. [2] introduced convolutional neural networks to learn features from images produced
by handwritten dynamics, which capture different information during the individual's assessment.
Additionally, this work makes available a dataset composed of images and signal-based data to
foster the research related to computer-aided PD diagnosis. The analysis of handwritten dynamics
using deep learning techniques showed to be useful for automatic Parkinson's disease identification,
as well as it can outperform handcrafted features.
Tanveer et al. [3] presented a comprehensive review of papers from 2013 to 2021 on the diagnosis
of PD and its subtypes using artificial neural networks (ANNs) and deep neural networks (DNNs).
This work presented detailed information and analysis regarding the usage of various modalities,
datasets, architectures, and experimental configurations in a succinct manner. This work also
presented an in-depth comparative analysis of various proposed architectures. Finally, presented
several relevant future directions for researchers in this area.
In [4], Dash et al. implemented machine learning (ML) methods to address these difficulties and to
refine the diagnosis and assessment procedures of PD, for the classification of PD and healthy
controls or patients with similar clinical presentations. ML is a subfield of artificial intelligence (AI)
that is increasingly applied to several medical diagnosis tasks, including to diagnose a wide range of
diseases. This chapter provided an overview of the application of ML techniques and introduces
some key concepts for PD diagnosis.
Nilashi et al. used Incremental support vector machine to predict Total-UPDRS and Motor-UPDRS
[5]. This work also used Non-linear iterative partial least squares for data dimensionality reduction
and self-organizing map for clustering task. To evaluate the method, this work conducted several
experiments with a PD dataset and present the results in comparison with the methods developed in
3
the previous research. The prediction accuracies of method measured by MAE for the Total-
UPDRS and Motor-UPDRS were obtained respectively MAE=0.4656 and MAE=0.4967.
In [6], Vilda et al. proposed methodology availed that the use of highly normalized descriptors as
the probability distribution of kinematic variables of vowel articulation stability, which has some
interesting properties in terms of information theory, boosts the potential of simple yet powerful
classifiers in producing quite acceptable detection results in Parkinson Disease.
Maachi et al. [7] proposed a novel intelligent Parkinson detection system based on deep learning
techniques to analyze gait information. This work used 1D convolutional neural network (1D-
Convnet) to build a Deep Neural Network (DNN) classifier. The proposed model processes 18 1D-
signals coming from foot sensors measuring the vertical ground reaction force (VGRF). The first
part of the network consists of 18 parallel 1D-Convnet corresponding to system inputs. The second
part is a fully connected network that connects the concatenated outputs of the 1D-Convnets to
obtain a final classification. This work tested the algorithm in Parkinson’s detection and in the
prediction of the severity of the disease with the Unified Parkinson’s Disease Rating Scale
(UPDRS).
Shivangi et al. [8] introduced two neural network-based models namely, VGFR Spectrogram
Detector and Voice Impairment Classifier, which aimed to help doctors and people in diagnosing
disease at an early stage. An extensive empirical evaluation of CNNs (Convolutional Neural
Networks) has been implemented on large-scale image classification of gait signals converted to
spectrogram images and deep dense ANNs (Artificial Neural Networks) on the voice recordings, to
predict the disease.
Pahuja et al. [9] discussed three types of classifiers, namely, Multilayer Perceptron, Support Vector
Machine and K-nearest neighbor on the benchmark (voice) dataset to compare and to know which
of these classifiers is the most efficient and accurate for PD classification. The Voice input dataset
for these classifiers has been obtained from UCI machine learning repository. ANN with
Levenberg–Marquardt algorithm was found to be the best classifier, having highest classification
accuracy (95.89%).
Lavalle et al. [10] researched on Parkinson disease (PD) detection has shown that vocal disorders
are linked to symptoms in 90% of the PD patients at early stages. Thus, there is an interest in
applying vocal features to the computer-assisted diagnosis and remote monitoring of patients with
PD at early stages. The contribution of this research is an increase of accuracy and a reduction of
the number of selected vocal features in PD detection while using the newest and largest public
4
dataset available. The best resulting accuracy is obtained by using a support vector machine and it is
higher than the one, which was reported on the first work to use the same dataset. In addition, the
corresponding computational complexity is further reduced by selecting no more than 20 features.
In [11], Zhang et al. investigated the mobile health (for short mHealth) technology for preventive
medicine, particularly in chronic disease management. Notably, many types of research have
explored the possibility of using mobile and wearable personal devices to detect the symptom of PD
and shown promising results. It provided opportunities for transforming early PD detection from
clinical to daily life. This survey paper attempted to conduct a comprehensive review of mHealth
technologies for PD detection from 2000 to 2019 and compared their pros and cons in practical
applications and provides insights to close the performance gap between state-of-the-art clinical
approaches and mHealth technologies.
In [12], Alzubaidi et al. aimed to explore and summarize the applications of neural networks to
diagnose PD. PRISMA Extension for Scoping Reviews (PRISMA-ScR) was followed to conduct
this scoping review. To identify the relevant studies, both medical databases (e.g., PubMed) and
technical databases (IEEE) were searched. Three reviewers carried out the study selection and
extracted the data from the included studies independently. Then, the narrative approach was
adopted to synthesis the extracted data.
Ali et al. [13] proposed to use random under sampling method to balance the training process. The
second problem is low rate of classification accuracy which has limited clinical significance. To
improve the PD detection accuracy, this work proposed a cascaded learning system that cascades a
Chi2 model with adaptive boosting (Adaboost) model. The Chi2 model ranks and selects a subset of
relevant features from the feature space while Adaboost model is used to predict PD based on the
subset of features.
Wodzinski et al. [14] presented an approach to Parkinson's disease detection using vowels with
sustained phonation and a ResNet architecture dedicated originally to image classification. This
work calculated spectrum of the audio recordings and used them as an image input to the ResNet
architecture pre-trained using the ImageNet and SVD databases. To prevent overfitting the dataset
was strongly augmented in the time domain. The Parkinson's dataset (from PC-GITA database)
consists of 100 patients (50 were healthy / 50 were diagnosed with Parkinson's disease). Each
patient was recorded 3 times. The obtained accuracy on the validation set is above 90% which is
comparable to the current state-of-the-art methods.
5
Quan et al. [15] explored static and dynamic speech features relating to PD detection. A
comparative analysis of the articulation transition characteristics showed that the number of
articulation transitions and the trend of the fundamental frequency curve are significantly different
between HC speakers and PD patients. Motivated by this observation, this work proposed to apply
Bidirectional long-short term memory (LSTM) model to capture time-series dynamic features of a
speech signal for detecting PD. The dynamic speech features are measured based on computing the
energy content in the transition from unvoiced to voiced segments (onset), and in the transition from
voiced to unvoiced segments (offset).
6
CHAPTER 3
EXISTING SYSTEM
3.1 Artificial neural network
It determines weighted total is passed as an input to an activation function to produce the output.
Activation functions choose whether a node should fire or not. Only those who are fired make it to
the output layer. There are distinctive activation functions available that can be applied upon the
sort of task we are performing.
To define a neural network that consists of many artificial neurons, which are termed units arranged
in a sequence of layers. Let’s us look at various types of layers available in an artificial neural
network.
Input Layer:
As the name suggests, it accepts inputs in several different formats provided by the programmer.
Hidden Layer:
The hidden layer presents in-between input and output layers. It performs all the calculations to find
hidden features and patterns.
Output Layer:
The input goes through a series of transformations using the hidden layer, which finally results in
output that is conveyed using this layer.
The artificial neural network takes input and computes the weighted sum of the inputs and includes
a bias. This computation is represented in the form of a transfer function.
7
It determines weighted total is passed as an input to an activation function to produce the output.
Activation functions choose whether a node should fire or not. Only those who are fired make it to
the output layer. There are distinctive activation functions available that can be applied upon the
sort of task we are performing.
· Hardware dependence
8
CHAPTER 4
PROPOSED SYSTEM
In this project we are designing Advanced Convolution Neural Network based Machine Learning
algorithm model to predict Parkinson disease from both Image and voice data. All existing ML
algorithms such as SVM, Random Forest will not filter data multiple times so its prediction
accuracy is less so we have used CNN algorithm which filter data multiple times using NEURON
values so its prediction accuracy can be better.
4.1 Pre-processing
Data pre-processing is a process of preparing the raw data and making it suitable for a machine
learning model. It is the first and crucial step while creating a machine learning model.
When creating a project, it is not always a case that we come across the clean and formatted data.
And while doing any operation with data, it is mandatory to clean it and put in a formatted way. So,
for this, we use data pre-processing task.
A real-world data generally contains noises, missing values, and maybe in an unusable format
which cannot be directly used for machine learning models. Data pre-processing is required tasks
for cleaning the data and making it suitable for a machine learning model which also increases the
accuracy and efficiency of a machine learning model.
9
· Importing libraries
· Importing datasets
· Feature scaling
4.1.1 Splitting the Dataset into the Training set and Test set
In machine learning data pre-processing, we divide our dataset into a training set and test set. This
is one of the crucial steps of data pre-processing as by doing this, we can enhance the performance
of our machine learning model.
Supposeif we have given training to our machine learning model by a dataset and we test it by a
completely different dataset. Then, it will create difficulties for our model to understand the
correlations between the models.
If we train our model very well and its training accuracy is also very high, but we provide a new
dataset to it, then it will decrease the performance. So we always try to make a machine learning
model which performs well with the training set and also with the test dataset. Here, we can define
these datasets as:
Training Set: A subset of dataset to train the machine learning model, and we already know the
output.
Test set: A subset of dataset to test the machine learning model, and by using the test set, model
predicts the output.
4.2 DL-CNN
10
According to the facts, training and testing of CNN involves in allowing every source data via a
succession of convolution layers by a kernel or filter, rectified linear unit (ReLU), max pooling,
fully connected layer and utilize SoftMax layer with classification layer to categorize the objects
with probabilistic values ranging from.
Convolution layer is the primary layer to extract the features from a source image and maintains the
relationship between pixels by learning the features of image by employing tiny blocks of source
data. It’s a mathematical function which considers two inputs like source image I ( x , y , d ) where x
and y denotes the spatial coordinates i.e., number of rows and columns. d is denoted as dimension
of an image (here d=3 since the source image is RGB) and a filter or kernel with similar size of
input image and can be denoted as F ( k x , k y , d )..
The output obtained from convolution process of input image and filter has a size of
C ( ( x−k x + 1 ) , ( y−k y +1 ) , 1 ), which is referred as feature map. Let us assume an input image with a
size of 5×5 and the filter having the size of 3×3. The feature map of input image is obtained by
multiplying the input image values with the filter values.
(a)
11
(b)
Fig. 4.3: Example of convolution layer process (a) an image with size 5×5 is convolving with 3×3
kernel (b) Convolved feature map.
ReLU layer
Networks those utilizes the rectifier operation for the hidden layers are cited as rectified linear unit
(ReLU). This ReLU function G(∙) is a simple computation that returns the value given as input
directly if the value of input is greater than zero else returns zero. This can be represented as
mathematically using the function max (∙) over the set of 0 and the input x as follows:
G ( x )=max { 0 , x }
This layer mitigates the number of parameters when there are larger size images. This can be called
as subsampling or down sampling that mitigates the dimensionality of every feature map by
preserving the important information. Max pooling considers the maximum element form the
rectified feature map.
· CNNs do not require human supervision for the task of identifying important features.
12
· CNNs make use of the same knowledge across all image locations.
CHAPTER 5
UML DAIGRAMS
Class Diagram: Class diagram is a static diagram. It represents the static view of an application.
Sequence Diagram: Sequence diagrams are used to capture the order of messages flowing from
one object to another.
13
Fig. 5.2: Sequence Diagram
Activity Diagram: Activity diagram is basically a flowchart to represent the flow from one activity
to another activity.
Use Case Diagram: Use case diagrams are used to gather the requirements of a system including
internal and external influences
15
Component Diagram: Component diagrams are used to describe the physical artifacts of a system.
16
CHAPTER 6
SOFTWARE ENVIRONMENT
· Python is currently the most widely used multi-purpose, high-level programming language.
· Programmers have to type relatively less and indentation requirement of the language,
makes them readable all the time.
· Python language is being used by almost all tech-giant companies like – Google, Amazon,
Facebook, Instagram, Dropbox, Uber… etc.
The biggest strength of Python is huge collection of standard library which can be used for the
following –
· Machine Learning
· Test frameworks
· Multimedia
1. Extensive Libraries
Python downloads with an extensive library and it contain code for various purposes like regular
expressions, documentation-generation, unit-testing, web browsers, threading, databases, CGI,
17
email, image manipulation, and more. So, we don’t have to write the complete code for that
manually.
2. Extensible
As we have seen earlier, Python can be extended to other languages. You can write some of your
code in languages like C++ or C. This comes in handy, especially in projects.
3. Embeddable
Complimentary to extensibility, Python is embeddable as well. You can put your Python code in
your source code of a different language, like C++. This lets us add scripting capabilities to our
code in the other language.
4. Improved Productivity
The language’s simplicity and extensive libraries render programmers more productive than
languages like Java and C++ do. Also, the fact that you need to write less and get more things done.
5. IOT Opportunities
Since Python forms the basis of new platforms like Raspberry Pi, it finds the future bright for the
Internet Of Things. This is a way to connect the language with the real world.
When working with Java, you may have to create a class to print ‘Hello World’. But in Python, just
a print statement will do. It is also quite easy to learn, understand, and code. This is why when
people pick up Python, they have a hard time adjusting to other more verbose languages like Java.
7. Readable
Because it is not such a verbose language, reading Python is much like reading English. This is the
reason why it is so easy to learn, understand, and code. It also does not need curly braces to define
blocks, and indentation is mandatory. This further aids the readability of the code.
8. Object-Oriented
This language supports both the procedural and object-oriented programming paradigms. While
functions help us with code reusability, classes and objects let us model the real world. A class
allows the encapsulation of data and functions into one.
18
Like we said earlier, Python is freely available. But not only can you download Python for free, but
you can also download its source code, make changes to it, and even distribute it. It downloads with
an extensive collection of libraries to help you with your tasks.
10. Portable
When you code your project in a language like C++, you may need to make some changes to it if
you want to run it on another platform. But it isn’t the same with Python. Here, you need to code
only once, and you can run it anywhere. This is called Write Once Run Anywhere (WORA).
However, you need to be careful enough not to include any system-dependent features.
11. Interpreted
Lastly, we will say that it is an interpreted language. Since statements are executed one by one,
debugging is easier than in compiled languages.
Any doubts till now in the advantages of Python? Mention in the comment section.
1. Less Coding
Almost all of the tasks done in Python requires less coding when the same task is done in other
languages. Python also has an awesome standard library support, so you don’t have to search for
any third-party libraries to get your job done. This is the reason that many people suggest learning
Python to beginners.
2. Affordable
Python is free therefore individuals, small companies or big organizations can leverage the free
available resources to build applications. Python is popular and widely used so it gives you better
community support.
The 2019 Github annual survey showed us that Python has overtaken Java in the most popular
programming language category.
Python code can run on any machine whether it is Linux, Mac or Windows. Programmers need to
learn different languages for different jobs but with Python, you can professionally build web apps,
perform data analysis and machine learning, automate things, do web scraping and also build games
and powerful visualizations. It is an all-rounder programming language.
19
6.3 Disadvantages of Python
So far, we’ve seen why Python is a great choice for your project. But if you choose it, you should
be aware of its consequences as well. Let’s now see the downsides of choosing Python over another
language.
1. Speed Limitations
We have seen that Python code is executed line by line. But since Python is interpreted, it often
results in slow execution. This, however, isn’t a problem unless speed is a focal point for the
project. In other words, unless high speed is a requirement, the benefits offered by Python are
enough to distract us from its speed limitations.
While it serves as an excellent server-side language, Python is much rarely seen on the client-side.
Besides that, it is rarely ever used to implement smartphone-based applications. One such
application is called Carbonnelle.
The reason it is not so famous despite the existence of Brython is that it isn’t that secure.
3. Design Restrictions
As you know, Python is dynamically typed. This means that you don’t need to declare the type of
variable while writing the code. It uses duck-typing. But wait, what’s that? Well, it just means that
if it looks like a duck, it must be a duck. While this is easy on the programmers during coding, it
can raise run-time errors.
Compared to more widely used technologies like JDBC (Java DataBase Connectivity) and ODBC
(Open DataBase Connectivity), Python’s database access layers are a bit underdeveloped.
Consequently, it is less often applied in huge enterprises.
5. Simple
20
No, we’re not kidding. Python’s simplicity can indeed be a problem. Take my example. I don’t do
Java, I’m more of a Python person. To me, its syntax is so simple that the verbosity of Java code
seems unnecessary.
This was all about the Advantages and Disadvantages of Python Programming Language.
Guido Van Rossum published the first version of Python code (version 0.9.0) at alt.sources in
February 1991. This release included already exception handling, functions, and the core data types
of list, dict, str and others. It was also object oriented and had a module system.
Python version 1.0 was released in January 1994. The major new features included in this release
were the functional programming tools lambda, map, filter and reduce, which Guido Van Rossum
never liked. Six and a half years later in October 2000, Python 2.0 was introduced. This release
included list comprehensions, a full garbage collector and it was supporting unicode. Python
flourished for another 8 years in the versions 2.x before the next major release as Python 3.0 (also
known as "Python 3000" and "Py3K") was released. Python 3 is not backwards compatible with
Python 2.x. The emphasis in Python 3 had been on the removal of duplicate programming
constructs and modules, thus fulfilling or coming close to fulfilling the 13th law of the Zen of
Python: "There should be one -- and preferably only one -- obvious way to do it."Some changes in
Python 7.3:
· The rules for ordering comparisons have been simplified. E.g., a heterogeneous list cannot
be sorted, because all the elements of a list must be comparable to each other.
· There is only one integer type left, i.e., int. long is int as well.
· The division of two integers returns a float instead of an integer. "//" can be used to have the
"old" behaviour.
Purpose
21
We demonstrated that our approach enables successful segmentation of intra-retinal layers—even
with low-quality images containing speckle noise, low contrast, and different intensity ranges
throughout—with the assistance of the ANIS feature.
TensorFlow
TensorFlow is a free and open-source software library for dataflow and differentiable programming
across a range of tasks. It is a symbolic math library and is also used for machine learning
applications such as neural networks. It is used for both research and production at Google.
TensorFlow was developed by the Google Brain team for internal Google use. It was released under
the Apache 2.0 open-source license on November 9, 2015.
NumPy
It is the fundamental package for scientific computing with Python. It contains various features
including these important ones:
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional
container of generic data. Arbitrary datatypes can be defined using NumPy which allows NumPy to
seamlessly and speedily integrate with a wide variety of databases.
Pandas
22
Pandas is an open-source Python Library providing high-performance data manipulation and
analysis tool using its powerful data structures. Python was majorly used for data munging and
preparation. It had very little contribution towards data analysis. Pandas solved this problem. Using
Pandas, we can accomplish five typical steps in the processing and analysis of data, regardless of
the origin of data load, prepare, manipulate, model, and analyze. Python with Pandas is used in a
wide range of fields including academic and commercial domains including finance, economics,
Statistics, analytics, etc.
Matplotlib
Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of
hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python
scripts, the Python and IPython shells, the Jupyter Notebook, web application servers, and four
graphical user interface toolkits. Matplotlib tries to make easy things easy and hard things possible.
You can generate plots, histograms, power spectra, bar charts, error charts, scatter plots, etc., with
just a few lines of code. For examples, see the sample plots and thumbnail gallery.
For simple plotting the pyplot module provides a MATLAB-like interface, particularly when
combined with IPython. For the power user, you have full control of line styles, font properties,
axes properties, etc, via an object oriented interface or via a set of functions familiar to MATLAB
users.
Scikit – learn
Scikit-learn provides a range of supervised and unsupervised learning algorithms via a consistent
interface in Python. It is licensed under a permissive simplified BSD license and is distributed under
many Linux distributions, encouraging academic and commercial use. Python
Python features a dynamic type system and automatic memory management. It supports multiple
programming paradigms, including object-oriented, imperative, functional and procedural, and has
a large and comprehensive standard library.
23
· Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to
compile your program before executing it. This is similar to PERL and PHP.
· Python is Interactive − you can actually sit at a Python prompt and interact with the
interpreter directly to write your programs.
Python also acknowledges that speed of development is important. Readable and terse code is part
of this, and so is access to powerful constructs that avoid tedious repetition of code. Maintainability
also ties into this may be an all but useless metric, but it does say something about how much code
you have to scan, read and/or understand to troubleshoot problems or tweak behaviors. This speed
of development, the ease with which a programmer of other languages can pick up basic Python
skills and the huge standard library is key to another area where Python excels. All its tools have
been quick to implement, saved a lot of time, and several of them have later been patched and
updated by people with no Python background - without breaking.
Python a versatile programming language doesn’t come pre-installed on your computer devices.
Python was first released in the year 1991 and until today it is a very popular high-level
programming language. Its style philosophy emphasizes code readability with its notable use of
great whitespace.
The object-oriented approach and language construct provided by Python enables programmers to
write both clear and logical code for projects. This software does not come pre-packaged with
Windows.
There have been several updates in the Python version over the years. The question is how to install
Python? It might be confusing for the beginner who is willing to start learning Python but this
tutorial will solve your query. The latest or the newest version of Python is version 3.7.4 or in other
words, it is Python 3.
Note: The python version 3.7.4 cannot be used on Windows XP or earlier devices.
Before you start with the installation process of Python. First, you need to know about your System
Requirements. Based on your system type i.e. operating system and based processor, you must
download the python version. My system type is a Windows 64-bit operating system. So the steps
below are to install python version 3.7.4 on Windows 7 device or to install Python 3. Download the
24
Python Cheatsheet here.The steps on how to install Python on Windows 10, 8 and 7 are divided into
4 parts to help understand better.
Step 1: Go to the official site to download and install python using Google Chrome or any other
web browser. OR Click on the following link: https://www.python.org
Now, check for the latest and the correct version for your operating system.
Step 3: You can either select the Download Python for windows 3.7.4 button in Yellow Color or
you can scroll further down and click on download with respective to their version. Here, we are
downloading the most recent python version for windows 3.7.4
25
Fig. 4.3: Latest Versions of Python
Step 4: Scroll down the page until you find the Files option.
Step 5: Here you see a different version of python along with the operating system.
· To download Windows 32-bit python, you can select any one from the three options:
Windows x86 embeddable zip file, Windows x86 executable installer or Windows x86
web-based installer.
· To download Windows 64-bit python, you can select any one from the three options:
Windows x86-64 embeddable zip file, Windows x86-64 executable installer or Windows
x86-64 web-based installer.
Here we will install Windows x86-64 web-based installer. Here your first part regarding which
version of python is to be downloaded is completed. Now we move ahead with the second part in
installing python i.e. Installation
26
Note: To know the changes or updates that are made in the version you can click on the Release
Note Option.
Installation of Python
Step 1: Go to Download and Open the downloaded python version to carry out the installation
process.
Step 2: Before you click on Install Now, Make sure to put a tick on Add Python 3.7 to PATH.
Step 3: Click on Install NOW After the installation is successful. Click on Close.
27
Fig. 4.3: Python Installation Completed
With these above three steps on python installation, you have successfully and correctly installed
Python. Now is the time to verify the installation.
Step 4: Let us test whether the python is correctly installed. Type python –V and press Enter.
28
Fig. 4.3: Command Prompt
Note: If you have any of the earlier versions of Python already installed. You must first uninstall the
earlier version and then install the new one.
Step 3: Click on IDLE (Python 3.7 64-bit) and launch the program
Step 4: To go ahead with working in IDLE you must first save the file. Click on File > Click on
Save
29
Fig. 4.3: Python Shell
Step 5: Name the file and save as type should be Python files. Click on SAVE. Here I have named
the files as Hey World.
Step 6: Now for e.g. enter print (“Hey World”) and Press Enter.
You will see that the command given is launched. With this, we end our tutorial on how to install
Python. You have learned how to download python for windows into your respective operating
system.
Note: Unlike Java, Python does not need semicolons at the end of the statements otherwise it won’t
work.
30
CHAPTER 7
SYSTEM REQUIREMENTS
SOFTWARE REQUIREMENTS
The functional requirements or the overall description documents include the product perspective
and features, operating system and operating environment, graphics requirements, design
constraints and user documentation.
The appropriation of requirements and implementation constraints gives the general overview of the
project in regard to what the areas of strength and deficit are and how to tackle them.
· Jupiter (or)
· Google colab
HARDWARE REQUIREMENTS
Minimum hardware requirements are very dependent on the software being developed by a
given Enthought Python / Canopy / VS Code user. Applications that need to store large
arrays/objects in memory will require more RAM, whereas applications that need to perform
numerous calculations or tasks more quickly will require a faster processor.
· Ram : minimum 4 GB
CHAPTER 8
31
FUNCTIONAL REQUIREMENTS
8.1 OUTPUT DESIGN
Outputs from computer systems are required primarily to communicate the results of processing to
users. They are also used to provides a permanent copy of the results for later consultation. The
various types of outputs in general are:
· Internal Outputs whose destination is within organization, and they are the
OUTPUT DEFINITION
It is not always desirable to print or display data as it is held on a computer. It should be decided as
which form of the output is the most suitable.
32
Input design is a part of overall system design. The main objective during the input design is as
given below:
INPUT STAGES
· Data recording
· Data transcription
· Data conversion
· Data verification
· Data control
· Data transmission
· Data validation
· Data correction
INPUT TYPES
It is necessary to determine the various types of inputs. Inputs can be categorized as follows:
INPUT MEDIA
At this stage choice has to be made about the input media. To conclude about the input media
consideration has to be given to;
· Type of input
33
· Flexibility of format
· Speed
· Accuracy
· Verification methods
· Rejection rates
· Ease of correction
· Security
· Easy to use
· Portability
Keeping in view the above description of the input types and input media, it can be said that most of
the inputs are of the form of internal and interactive. As
Input data is to be the directly keyed in by the user, the keyboard can be considered to be the most
suitable input device.
ERROR AVOIDANCE
At this stage care is to be taken to ensure that input data remains accurate form the stage at which it
is recorded up to the stage in which the data is accepted by the system. This can be achieved only
by means of careful control each time the data is handled.
ERROR DETECTION
Even though every effort is make to avoid the occurrence of errors, still a small proportion of errors
is always likely to occur, these types of errors can be discovered by using validations to check the
input data.
DATA VALIDATION
Procedures are designed to detect errors in data at a lower level of detail. Data validations have
been included in the system in almost every area where there is a possibility for the user to commit
errors. The system will not accept invalid data. Whenever an invalid data is keyed in, the system
immediately prompts the user and the user has to again key in the data and the system will accept
the data only if the data is correct. Validations have been included where necessary.
34
The system is designed to be a user friendly one. In other words the system has been designed to
communicate effectively with the user. The system has been designed with popup menus.
It is essential to consult the system users and discuss their needs while designing the user interface:
· User initiated interface the user is in charge, controlling the progress of the user/computer
dialogue. In the computer-initiated interface, the computer selects the next stage in the
interaction.
In the computer-initiated interfaces the computer guides the progress of the user/computer dialogue.
Information is displayed and the user response of the computer takes action or displays further
information.
· Command driven interfaces: In this type of interface the user inputs commands or queries
which are interpreted by the computer.
· Forms oriented interface: The user calls up an image of the form to his/her screen and fills in
the form. The forms-oriented interface is chosen because it is the best choice.
COMPUTER-INITIATED INTERFACES
· The menu system for the user is presented with a list of alternatives and the user chooses
one; of alternatives.
· Questions – answer type dialog system where the computer asks question and takes action
based on the basis of the users reply.
Right from the start the system is going to be menu driven, the opening menu displays the available
options. Choosing one option gives another popup menu with more options. In this way every
option leads the users to data entry form where the user can key in the data.
35
ERROR MESSAGE DESIGN
The design of error messages is an important part of the user interface design. As user is bound to
commit some errors or other while designing a system the system should be designed to be helpful
by providing the user with information regarding the error he/she has committed.
This application must be able to produce output at different modules for different inputs.
PERFORMANCE REQUIREMENTS
The requirement specification for any system can be broadly stated as given below:
· The existing system is completely dependent on the user to perform all the duties.
CHAPTER 9
SOURCE CODE
36
from tkinter import messagebox
import tkinter
import cv2
import random
import numpy as np
import pickle
import os
import pandas as pd
main = tkinter.Tk()
main.title("Convolutional Neural Networks Model for Parkinson Disease Detection from Images")
main.geometry("1300x1200")
global filename
global image_classifier
def loadDLModel():
37
global image_classifier
loaded_model_json = json_file.read()
image_classifier = model_from_json(loaded_model_json)
json_file.close()
image_classifier.load_weights("model/images_model_weights.h5")
image_classifier._make_predict_function()
print(image_classifier.summary())
f = open('model/images_history.pckl', 'rb')
data = pickle.load(f)
f.close()
acc = data['accuracy']
accuracy = acc[48]*100
text.insert(END,str(accuracy))
def imageDetection():
global image_classifier
labels = ['Healthy','Parkinson']
filename = filedialog.askopenfilename(initialdir="testImages")
image = cv2.imread(filename)
im2arr = np.array(img)
im2arr = im2arr.reshape(1,64,64,3)
img = np.asarray(im2arr)
img = img.astype('float32')
38
img = img/255
preds = image_classifier.predict(img)
predict = np.argmax(preds)
img = cv2.imread(filename)
cv2.waitKey(0)
def graph():
f = open('model/images_history.pckl', 'rb')
image = pickle.load(f)
f.close()
img_accuracy = image['accuracy']
img_loss = image['loss']
plt.figure(figsize=(10,6))
plt.grid(True)
plt.xlabel('Epochs')
plt.ylabel('Accuracy/Loss')
plt.title('Performance Comparison')
plt.show()
def close():
39
main.destroy()
title = Label(main, text='Convolutional Neural Networks Model for Parkinson Disease Detection
from Images',anchor=W, justify=CENTER)
title.config(bg='yellow4', fg='white')
title.config(font=font)
title.config(height=3, width=120)
title.place(x=0,y=5)
loadButton.place(x=50,y=100)
loadButton.config(font=font1)
imageButton.place(x=50,y=150)
imageButton.config(font=font1)
graphButton.place(x=50,y=200)
graphButton.config(font=font1)
exitButton.place(x=50,y=250)
exitButton.config(font=font1)
text=Text(main,height=20,width=78)
scroll=Scrollbar(text)
text.configure(yscrollcommand=scroll.set)
40
text.place(x=450,y=100)
text.config(font=font1)
main.config(bg='Sky Blue')
main.mainloop()
CHAPTER 10
This project implements a graphical user interface (GUI) application for detecting Parkinson's
disease from images using a deep CNN) model. It essentially loads a pre-trained CNN model, select
an image for Parkinson's disease detection, view prediction results, and visualize the model's
training performance through a graph. It provides a user-friendly way to utilize a deep learning
model for medical image analysis. Here’s a step-by-step explanation:
¾ It starts by importing necessary libraries, including Tkinter for GUI, OpenCV (cv2) for
image processing, Keras for deep learning, and other relevant libraries like NumPy, pandas,
and matplotlib.
¾ It initializes the main GUI window using Tkinter, sets the title, and defines its dimensions.
¾ It defines two global variables: filename (to store the path of the selected image) and
image_classifier (to store the trained CNN model).
¾ The loadDLModel function loads a pre-trained CNN model from JSON and weights from
H5 files. It also loads the training history using pickle and prints the summary of the loaded
model.
¾ The imageDetection function allows the user to select an image for Parkinson's disease
detection. It resizes the image to 64x64 pixels, preprocesses it, and feeds it into the loaded
CNN model to make predictions. It displays the original image with the predicted result
(either "Healthy" or "Parkinson").
¾ The graph function displays a performance comparison graph of the CNN model using data
from the training history (accuracy and loss).
¾ The code defines the fonts and labels for buttons and the title label for the GUI.
¾ It creates buttons for loading the CNN model, detecting Parkinson's disease from an image,
displaying a performance graph, and exiting the application.
¾ A text widget is included to display information, including the CNN model's accuracy.
¾ Finally, the GUI main loop (main.mainloop()) starts, allowing the user to interact with the
application.
42
Figure 1 displays examples of spiral drawings made by individuals who are healthy. It shows a few
samples of spiral patterns drawn by individuals without Parkinson's disease. These samples are used
as a reference for comparison with the spiral drawings from individuals with Parkinson's disease.
Figure 2 displays an examples of wave patterns drawn by healthy individuals. These patterns are
used as a baseline for wave drawings created by individuals without Parkinson's disease.
Figure 3 showcase examples of spiral drawings made by individuals diagnosed with Parkinson's
disease. These drawings exhibit characteristic features associated with the motor control issues
typically seen in Parkinson's patients. Figure 4 displays examples of wave patterns drawn by
43
individuals with Parkinson's disease. The purpose is to demonstrate the differences between the
wave patterns of healthy individuals and those with Parkinson's disease.
44
Figure 5: User interface of proposed CNN-based Parkinson disease detection from images.
Figure 6: Illustration of UI with Deep CNN model accuracy after loading the pre-trained model.
Figure 5 illustrates the graphical user interface (GUI) of proposed CNN-based Parkinson disease
detection application. It shows the layout of buttons, text fields, and other components that users
interact with when using this application. Figure 6 shows the accuracy of the pre-trained CNN
model after it has been loaded, which helps to understand the reliability of the model's predictions.
Figure 7 depicts the architecture of deep CNN model layer by layer. It shows the convolutional
layers, pooling layers, fully connected layers, and other components of model, along with the
specifications.
45
Figure 7: Layer-wise summary of proposed deep CNN model.
Figure 8: Sample test data used for evaluating the pre-trained proposed CNN model.
Figure 8 shows some examples of the test data used to evaluate the performance of proposed deep
CNN model. It includes a few images that represent the input data the model is tested on. Figure 9
displays examples of images that have been input into trained CNN model, along with the model's
46
predictions for each image. This is a visual representation of how well the model is performing in
predicting whether an individual has Parkinson's disease based on their drawings.
47
Figure 10: Performance analysis of obtained accuracy, and loss using proposed CNN model.
In Figure 10, x-axis represents training epoch and y-axis represents accuracy and loss values and
with each increasing epoch, its accuracy getting increased, and loss is decreasing. At the final
epoch, accuracy reached closer to 1 and loss reached closer to 0.
48
CHAPTER 11
In conclusion, this project addresses the critical need for accurate and early diagnosis of Parkinson's
disease (PD) using advanced technology. Given the challenges associated with misdiagnosis and the
lack of sensitive and specific tests for PD, the development of a reliable diagnostic tool is
paramount. Leveraging convolutional neural network (CNN) models for analyzing both image and
speech data offers a promising approach due to their ability to filter data multiple times, leading to
improved prediction accuracy. By utilizing image data from WAVE and SINE images, along with
voice samples from the UCI Parkinson dataset, this project demonstrates the feasibility of using
diverse data sources for PD diagnosis. The CNN model developed in this project shows potential
for effectively distinguishing between normal individuals and those with PD, thereby aiding in
prompt and accurate diagnosis.
Future Scope:
Enhanced Data Collection: Expanding the dataset to include a larger and more diverse set of images
and voice samples could improve the robustness and generalizability of the CNN model.
Incorporating Clinical Data: Integrating additional clinical data, such as patient medical history,
demographics, and other biomarkers, could further enhance the diagnostic accuracy of the model.
Real-Time Diagnosis: Developing a real-time diagnostic tool that can analyze image and speech
data in real-time could enable early detection and intervention, potentially improving patient
outcomes.
Validation and Clinical Trials: Conducting rigorous validation studies and clinical trials to evaluate
the performance and effectiveness of the CNN model in real-world clinical settings is essential for
its eventual adoption and integration into clinical practice.
Integration with Medical Imaging Systems: Integrating the CNN model with existing medical
imaging systems and electronic health records (EHR) could streamline the diagnostic process and
facilitate seamless integration into clinical workflows.
49
CHAPTER 12
REFERENCES
1. U Haq, J. P. Li, B. L. Y. Agbley, C. B. Mawuli, Z. Ali, S. Nazir, S. U. Din, “A survey of deep
learning techniques-based Parkinson’s disease recognition methods employing clinical data”,
Expert Systems with Applications, Volume 208, 2022, 118045, ISSN 0957-4174,
https://doi.org/10.1016/j.eswa.2022.118045.
2. Clayton R. Pereira, Danilo R. Pereira, Gustavo H. Rosa, Victor H.C. Albuquerque, Silke A.T.
Weber, Christian Hook, João P. Papa, Handwritten dynamics assessment through
convolutional neural networks: An application to Parkinson's disease identification, Artificial
Intelligence in Medicine, Volume 87, 2018, Pages 67-77, ISSN 0933-3657,
https://doi.org/10.1016/j.artmed.2018.04.001.
4. S. Dash, A systematic review of adaptive machine learning techniques for early detection of
Parkinson's disease, Artificial Intelligence for Neurological Disorders, Academic Press, 2023,
Pages 361-385, ISBN 9780323902779, https://doi.org/10.1016/B978-0-323-90277-9.00018-3.
6. Vilda, Pedro, et al. "Parkinson disease detection from speech articulation neuromechanics."
Frontiers in neuroinformatics 11 (2017): 56.
7. I. E Maachi, G.A Bilodeau, W. Bouachir, Deep 1D-Convnet for accurate Parkinson disease
detection and severity prediction from gait, Expert Systems with Applications, Volume 143,
2020, 113075, ISSN 0957-4174, https://doi.org/10.1016/j.eswa.2019.113075.
8. Shivangi, A. Johri and A. Tripathi, "Parkinson Disease Detection Using Deep Neural
Networks," 2019 Twelfth International Conference on Contemporary Computing (IC3), 2019,
pp. 1-4, doi: 10.1109/IC3.2019.8844941.
50
9. G. Pahuja & T. N. Nagabhushan (2021) A Comparative Study of Existing Machine Learning
Approaches for Parkinson's Disease Detection, IETE Journal of Research, 67:1, 4-14, DOI:
10.1080/03772063.2018.1531730.
11. H. Zhang, C. Song, A. S. Rathore, M. -C. Huang, Y. Zhang and W. Xu, "mHealth
Technologies Towards Parkinson's Disease Detection and Monitoring in Daily Life: A
Comprehensive Review," in IEEE Reviews in Biomedical Engineering, vol. 14, pp. 71-81,
2021, doi: 10.1109/RBME.2020.2991813.
12. Alzubaidi MS, Shah U, Dhia Zubaydi H, Dolaat K, Abd-Alrazaq AA, Ahmed A, Househ M.
The Role of Neural Network for the Detection of Parkinson’s Disease: A Scoping Review.
Healthcare. 2021; 9(6):740. https://doi.org/10.3390/healthcare9060740.
13. L. Ali, C. Zhu, N. A. Golilarz, A. Javeed, M. Zhou and Y. Liu, "Reliable Parkinson’s Disease
Detection by Analyzing Handwritten Drawings: Construction of an Unbiased Cascaded
Learning System Based on Feature Selection and Adaptive Boosting Model," in IEEE Access,
vol. 7, pp. 116480-116489, 2019, doi: 10.1109/ACCESS.2019.2932037.
15. C. Quan, K. Ren and Z. Luo, "A Deep Learning Based Method for Parkinson’s Disease
Detection Using Dynamic Features of Speech," in IEEE Access, vol. 9, pp. 10239-10252,
2021, doi: 10.1109/ACCESS.2021.3051432.
51