Report
Report
Report
Bachelor of Technology
In
Submi3ed By
DECLARATION
We Khushboo Rathore , Kumari Lalini , Pranjal Panchal , Priyanka Bijore hereby declare that
the project en*tled “Early detecKon of diabeKc ReKnopathy using deep learning”, which is
submiYed by us for the par*al fulfilment of the requirement for the award of Bachelor of
Technology in Computer Science & Engineering to the Pres*ge Ins*tute of Engineering,
Management and Research, Indore (M.P.). Rajiv Gandhi Proudhyogiki Vishwavidyalaya,
Bhopal, comprises my work and due acknowledgement has been made in the text to all other
material used.
Signature of Students:
Place: Indore
INDORE (M.P.)
DISSERTATION APPROVAL SHEET
This is to cer*fy that the disserta*on en*tled “Early detecKon of diabeKc ReKnopathy using
fulfilment for the award of the degree of “Bachelor of Technology in Computer Science &
Date: Date:
HOD, CSE
Dr Piyush Choudhary
PIEMR, INDORE
INDORE (M.P.)
CERTIFICATE
This is cer*fied that the project en*tled “Early detecKon of diabeKc ReKnopathy using
deep learning” submiYed by Kumari Lalini, Khushboo Rathore , Pranjal Panchal , Priyanka
Bijore is a sa*sfactory account of the bona fide work done under our supervision and is
recommended towards par*al fulfilment for the award of the degree Bachelor of Technology
in Computer Science & Engineering to Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal
(M.P.).
Date:
Enclosed by:
Dr. Amita Jain Prof. Ajay Jaiswal Dr. Piyush Choudhary Project Guide Project
Director
PIEMR, Indore
INDORE (M.P.)
ACKNOWLEDGEMENT
A_er the comple*on of Minor project work, words are not enough to express our feelings
about all those who helped us to reach our goal; feeling above this is our indebtedness to the
almighty for providing us with this moment in life.
First and foremost, we take this opportunity to express our deep regards and hearaelt
gra*tude to our project guide Dr Amita Jain and Project Coordinator Prof. Ajay Jaiswal,
Department of Computer Science and Engineering, PIEMR, Indore for their inspiring
guidance and *mely sugges*ons in carrying out our project successfully. They are also a
constant source of inspira*on for us. Working under their guidance has allowed us to learn
more and more.
We are extremely thankful to Dr. Piyush Choudhary, (HOD, CSE) for his coopera*on and
mo*va*on during the project. We extend our deepest gra*tude to Dr Manojkumar
Deshpande, Director, PIEMR, and Indore for providing all the necessary facili*es and a truly
encouraging environment to bring out the best of our endeavours.
We would like to thank all the teachers in our department for providing invaluable support
and mo*va*on. We remain indebted to all the non-teaching staff of our Ins*tute who have
helped us immensely throughout the project.
We are also grateful to our friends and colleagues for their help and coopera*on throughout
this work. Last but not least; We thank our families for their support, pa*ence, blessings and
understanding while comple*ng our project.
Name of Students:
INDEX
Declara/on I
Abbrevia/ons VIII
TABLE OF CONTENTS
CHAPTER 1 INTRODUCTION
1.1 Introduc*on…………………………………………………………………….………..12
1.2 Mo*va*on………………………………………………………..............................13
1.3 Objec*ve…………………………………………………………………………………..13
CHAPTER 3
3 SYSTEM DESIGN & METHODOLOGY 6
4.8 MODULES 29
4.9 CODING AND TESTING 31
5.1 Result
6.1 CONCLUSION
6.2 FUTURE WORK
REFERENCES
APPENDIX
A. PAPER WORK
B. REPORT
C. SOURCE CODE
List Of Figures
3.5 DISTRIBUTION 17
3.6 TRANSFORMATION 17
3.7 SCENARIO-1 18
3.8 SCENARIO-2 19
3.9 MARGIN 19
3.10 SCENARIO-3 20
3.11 SCENARIO-4 20
3.13 SCENARIO-5 21
3.15 HYPER-PLANE 23
5.7 STAGES OF DR 42
Transfer learning has become one of the most common techniques that has achieved beYer
performance in many areas, especially in medical image analysis and classifica*on. We used
Transfer Learning techniques like Incep*on
V3,Resnet50,Xcep*on V3 that are more widely used as a transfer learning method in medical
image analysis and they are highly effec*ve. Diabe*c re*nopathy (DR) is a significant cause of
blindness among diabe*c individuals aged 25–65. It occurs due to lesions on the re*na caused
by weakened blood vessels, leading to visual impairment and even total blindness. Current
manual grading methods for detec*ng DR are both *me-consuming and prone to errors.
Our study aims to develop a CNN-based model using re*nal fundus images for early detec*on
of diabe*c re*nopathy. We will train the model on a substan*al dataset of re*nal pictures
using powerful compu*ng architecture provided by graphics processing units (GPUs). The
model’s performance will be evaluated using metrics such as accuracy, sensi*vity, and
specificity, enhancing its classifica*on capabili*es.
By leveraging deep learning techniques, our proposed solu*on has the poten*al to improve
DR detec*on, enabling faster and more reliable interpreta*on of re*nal images.
1.2 Mo/va/on
Diabe*c Re*nopathy (DR) is a serious complica*on of diabetes that affects the eyes. It is the
leading cause of blindness in the working-age popula*on worldwide, es*mated to impact
over 347 million people1. When blood sugar levels remain uncontrolled for an extended
period, DR can develop. However, early detec*on and interven*on can prevent vision loss.
Global Health Impact: DR affects millions of people, and its prevalence con*nues to rise. By
using ar*ficial intelligence (AI) and deep learning, we can iden*fy signs of DR from re*nal
fundus images, allowing for *mely treatment and preven*ng blindness1.
Efficiency and Accessibility: Tradi*onal diagnos*c methods require skilled doctors and
significant *me investment. Automa*ng DR detec*on using deep learning models reduces the
burden on healthcare professionals and ensures faster, more accessible screening2.
Precision and Early IntervenKon: Deep neural networks, such as Convolu*onal Neural
Networks (CNNs) and Residual Networks (ResNets), excel at analyzing medical images. By
training these models on large datasets, we can achieve high accuracy in iden*fying DR at an
early stage, enabling *mely interven*on3.
Scalability: Once trained, the model can process a large number of images efficiently. This
scalability is essen*al for popula*on-wide screening and monitoring4.1.3 Objec*ves
The principal aim of this project is to formulate a web-based plant disease detec*on system
that integrates advanced deep learning techniques, specifically leveraging Convolu*onal
Neural Networks (CNNs), with the user-friendly interface inherent in a Django web
applica*on. The fundamental objec*ve is to furnish farmers and agricultural stakeholders with
a robust and easily navigable tool for the expedi*ous and precise iden*fica*on of plant
diseases from images of their leaves. Through the applica*on of comprehensive data pre-
processing, the project endeavours to op*mize model accuracy, thereby ensuring dependable
diagnoses. Ul*mately, the system aspires to facilitate real-*me, data-driven decision-making
in the realm of agriculture, enabling early disease detec*on and the *mely applica*on of
remedies. In doing so, it endeavours to contribute substan*vely to the enhancement of crop
yields and the promo*on of sustainable farming prac*ces.
1.4 Analysis
Diabe*c Re*nopathy (DR) is a progressive eye disease caused by diabetes, affec*ng the blood
vessels in the re*na. Le_ untreated, it can lead to vision impairment and blindness. The
primary objec*ve of this project is to develop an automated system that detects DR at an
early stage using deep learning techniques.
Func/onal Requirements:
Image ClassificaKon Model: Develop a deep learning model capable of classifying re*nal
fundus images into two categories: normal (no signs of DR) and abnormal (indica*ng DR).
Achieve high accuracy and robustness to varia*ons in image quality, ligh*ng, and pa*ent
demographics.
Implement transfer learning using pre-trained CNN architectures (e.g., ResNet, VGG) to
leverage learned features.
Extend the model to predict severity levels of DR (mild, moderate, severe, or prolifera*ve).
Provide interpretable results, highligh*ng regions in the image that contribute to the severity
predic*on.
Scalability and Efficiency: Ensure the model can process a large number of images efficiently.
Non-Func/onal Requirements:
Accuracy and SensiKvity: Achieve high sensi*vity (recall) to minimize false nega*ves (missed
cases of DR).
Robustness and GeneralizaKon: Validate the model on diverse datasets from different clinics
and popula*ons.
Ethical ConsideraKons: Ensure pa*ent privacy and informed consent during data collec*on.
Develop an intui*ve user interface for clinicians to upload images and receive predic*ons.
Deploy the model on cloud servers or edge devices for widespread adop*on.
Interpretability:
Use techniques like Grad-CAM to visualize which regions in the image contribute to the
model’s decision.
oZ
Fig 1.1 Use Case Diagram
CHAPTER 2 BACKGROUND
AND RELATED WORK
2.1 Problem Statement
Diabe*c re*nopathy (DR) is a common complica*on of diabetes that affects the re*na and
can lead to vision loss. Early detec*on of DR is crucial for *mely interven*on and preven*ng
irreversible damage. The goal of this project is to develop an accurate and efficient deep
learning model that can analyze fundus images and classify them based on the severity of DR.
The model should be able to predict whether a pa*ent has no DR, mild DR, moderate DR,
severe DR, or prolifera*ve DR. The project aims to achieve the following objec*ves:
Model Architecture:
Explore various architectures (e.g., CNNs, ResNets) and choose the most effec*ve one.
Train the model using labeled data, ensuring proper valida*on and hyperparameter tuning.
Evaluate the model’s performance using metrics such as accuracy, precision, recall, and F1-
score.
Severity Grading:
Integrate the model into exis*ng healthcare systems for real-*me diagnosis.
:
Related Work: Researchers have explored various deep learning techniques to automate the
iden*fica*on and categoriza*on of diabe*c re*nopathy from fundus images. Notable
approaches include:
CNNs have shown promise in automa*ng DR diagnosis. They analyze re*nal images and
classify them based on severity.
Google AI, IDx-Diabe*c Re*nopathy, Eyenuk, and VoxelCloud are among the current
approaches using CNNs with high accuracy and speed, saving *me and costs compared to
manual diagnosis1.
Transfer Learning:
Researchers have experimented with pre-trained CNN models to predict diabe*c re*nopathy.
Transfer learning allows leveraging knowledge from exis*ng models for beYer performance2.
Addressing Imbalance:
Imbalanced datasets (e.g., fewer severe cases) pose challenges. Methods like synthe*c
minority oversampling technique (SMOTE) and oversampling with early stopping help
mi*gate overfixng and improve model robustness3.
Conclusion: A general deep learning model for detec*ng DR has been developed, applicable
across various DR databases.
2. Tan KW, Dickens BSL, Cook AR (2020) Projected burden of type 2 diabetes mellitus-
related complica*ons in Singapore un*l 2050: a Bayesian evidence synthesis. BMJ Open
Diab Res Care 8:000928
5. Chaki J, Ganesh ST, Cidham SK, Theertan SA (2022) Machine learning and ar*ficial
intelligence based Diabetes Mellitus detec*on and self-management: a systema*c
review. J King Saud Univ 34:3204
- .
CHAPTER 3
SYSTEM DESIGN & METHEDOLOGY
3.1 EXISTINGSYSTEM
The obtained results are compared with the results of exis*ng models within the same
domain and found to be improved. The data of diabe*c pa*ents collected from the
UCI laboratory is used to discover paYerns with are K Nearest Neighbours (KNN), Naive
Bayes
(NB), Support Vector Machine (SVM), Decision Tree (DT), Logis*c Regression (LR) and
Random Forest (RF). The results are compared for performance and accuracy with
these algorithms. The proposed hybrid method returns results of 78.5%, compe*ng
In this paper, six machine learning algorithms are used to predict diabetes disease.
These six algorithms are K Nearest Neighbours (KNN), Naive Bayes (NB), Support
Vector Machine (SVM), Decision Tree (DT), Logis*c Regression (LR) and Random Forest
3.3 REQUIREMENTSPECIFICATION
This proposed so_ware runs effec*vely on a compu*ng system that has the minimum
requirements.
So`ware Requirements
The basic so_ware requirements to run the program are:
✔ Opera*ng System : Windows 7 , 8, 10 (64 bit)
✔ So_ware : Python
Hardware Requirements
3.4 TECHNOLOGIES
USED Python
Random Forest and Support Vector
3.4.1 Introduc)on to Python
ini*ally designed by Guido van Rossum in 1991 and developed by Python So_ware
Founda*on. It was mainly developed for emphasis on code readability, and its syntax
It is used for:
● System scrip*ng.
so_ware development.
Why Python?
very quick.
● Python can be treated in a procedural way, an object-orientated way or
a
func*onal way.
Good to know
with anything
compa*ble with the 2.x versions. Python 2 and 3 are very similar, and
with periodic release updates for both. As of this wri*ng, the most
recent versions available are 2.7.15 and 3.6.5. However, an official End
Of Life date of January 1, 2020 has been established for Python 2, a_er
Guido is s*ll in charge, having been given the *tle of BDFL (Benevolent
Dictator For Life) by the Python community. The name Python, by the
way, derives not from the snake, but from the Bri*sh comedy troupe
Monty Python’s Flying Circus, of which Guido was, and presumably s*ll
● Python was designed to for readability, and has some similari*es to the
English language with influence from mathema*cs.
o_en
Python is Interpreted
● Many languages are compiled, meaning the source code you create
● This makes for a quicker development cycle because you just type in
your code and run it, without the intermediate compila*on step.
Programs that are compiled into the na*ve language of the computer
processor tend to run more quickly than interpreted programs. For some
interpreted language is
typically worth it for most applica*ons.
● For all its syntac*cal simplicity, Python supports most constructs that
object-oriented programming.
that provides capability well beyond what is built into the language, such
as database manipula*on or GUI programming.
you can
which we will discuss in this ar*cle. While the algorithm is very popular in various
compe**ons (e.g. like the ones running on Kaggle), the end output of the model
countries:
● Mexico has the second highest Gini coefficient and hence has a very high
segrega*on in annual income of rich and poor. Our task is to come up with an
● 1. below $40,000
● 2. $40,000 – 150,000
● We will only talk about random forest to make this predic*on in this ar*cle.
Random forest tries to build mul*ple CART model with different sample and
different ini*al variables. For instance, it will take a random sample of 100
observa*on and 5 randomly chosen ini*al variables to build a CART model. It
will repeat the process (say) 10 *mes and then make a final predic*on on each
predic*on.
up 10k observa*on with only one variable (for simplicity) to build each CART
model. In total, we are looking at 5 CART models being built with different
variables. In a real life problem, you will have more number of popula*on
● Using these 5 CART models, we need to come up with singe set of probability
to belong to each of the salary classes. For simplicity, we will just take a mean
of probabili*es in this case study. Other than simple mean, we also consider
vote method to come up with the final predic*on. To come up with the final
● For each of these CART model, following is the distribu*on across salary bands:
● The final probability is simply the average of the probability in the same salary
bands in different CART models. As you can see from this analysis, that there is
70% chance of this individual falling in class 1 (less than $40,000) and around
24%
● Conclusion
● Random forest gives much more accurate predic*ons when compared to simple
have high number of predic*ve variables and huge sample size. This is because
it captures the variance of several input variables at the same *me and enables
high
Support Vector
Machine (SVM)
IntroducKon:
Mastering machine learning algorithms isn’t a myth at all. Most of the beginners start
by learning regression. It is simple to learn and use, but does that solve our purpose?
Of course not! Because, you can do so much more than just Regression!
Think of machine learning algorithms as an armory packed with axes, sword, blades,
bow, dagger etc. You have various tools, but you ought to learn to use them at the right
*me. As an analogy, think of ‘Regression’ as a sword capable of slicing and dicing data
efficiently, but incapable of dealing with highly complex data. On the contrary,
‘Support Vector Machines’ is like a sharp knife – it works on smaller datasets, but on
can be used for either classifica*on or regression challenges. However, it is mostly used
ndimensional space (where n is number of features you have) with the value of each
finding the
hyper-plane that differen*ate the two classes very well (look at the below snapshot).
Support Vectors are simply the co-ordinates of individual observa*on. Support Vector
Machine is a fron*er which best segregates the two classes (hyper-plane/ line).
You can look at defini*on of support vectors and a few examples of its working here.
Let’s talk about how support vector machine works. This is suitable for readers who do
not know much about this algorithm and have a curiosity to learn a new technique. In
following explore the technique in detail and analyze cases where such techniques are
composed of 50%-50% Males and Females. Using a sample of this popula*on, you
want to create some set of rules which will guide us the gender class for rest of the
popula*on. Using this algorithm, we intend to build a robot which can iden*fy
analysis. Using some set of rules, we will try to classify the popula*on into two possible
segments. For simplicity, let’s assume that the two differen*a*ng factors iden*fied
The blue circles in the plot represent females and green squares represents male. A
few
If we were to see an individual with height 180 cm’s and hair length 4 cm\s, our best
guess
Support Vectors are simply the co-ordinates of individual observa*on. For instance,
is a fron*er which best segregates the Male from the Females. In this case, the two
classes are
There are many possible fron*ers which can classify the problem in hand. Following
are the three possible fron*ers.
How do we decide which is the best fron*er for this par*cular problem statement?
The easiest way to interpret the objec*ve func*on in a SVM is to find the minimum
distance of the fron*er from closest support vector (this can belong to any class). For
instance, orange fron*er is closest to blue circles. And the closest blue circle is 2 units
away from the fron*er. Once we have these distances for all the fron*ers, we simply
choose the fron*er with the maximum distance (from the closest support vector). Out
fron*ers, we see the black fron*er is farthest from nearest support vector (i.e. 15
units).
Our job was rela*vely easier finding the SVM in this business case. What if the
distribu*on looked something like as follows?
In such cases, we do not see a straight line fron*er directly in current plane which can
serve as the SVM. In such cases, we need to map these vectors to a higher dimension
plane so that they get segregated from each other. Such cases will be covered once we
start with the formula*on of SVM. For now, you can visualize that such transforma*on
will
And transformed scale has clearly segregated classes. Many algorithms have been
Above, we got accustomed to the process of segrega*ng the two classes with a
hyperplane. Now the burning ques*on is “How can we iden*fy the right hyper-plane?”
Don’t
Let’s understand:
● IdenKfy the right hyper-plane (Scenario-1): Here, we have three hyper-planes (A,
B and C). Now, iden*fy the right hyper-plane to classify star and circle.
You need to remember a thumb rule to iden*fy the right hyper-plane: “Select
the hyper-plane which segregates the two classes beYer”. In this scenario,
hyper-plane “B” has excellently performed this job.
(A, B and C) and all are segrega*ng the classes well. Now, how can we iden*fy
class) and hyper-plane will help us to decide the right hyper-plane. This
Above, you can see that the margin for hyper-plane C is high as compared to
select a hyper-
Some of you may have selected the hyper-plane B as it has higher margin
compared to A. But, here is the catch; SVM selects the hyper-plane which
B has a classifica*on error and A has classified all correctly. Therefore, the right
hyper-plane is A.
two classes using a straight line, as one of star lies in the territory of
other(circle)
class as an outlier.
FIG 3.11: SCENARIO-4
As I have already men*oned, one star at other end is like an outlier for star class.
SVM has a feature to ignore outliers and find the hyper-plane that has maximum
below, we can’t have linear hyper-plane between the two classes, so how does
SVM
classify these two classes? Till now, we have only looked at the linear hyper-plane.
FIG 3.13: SCENARIO-5
SVM can solve this problem. Easily! It solves this problem by introducing addi*onal feature.
Here, we will add a new feature z=x^2+y^2. Now, let’s plot the data points
on axis x and z:
o All values for z would be posi*ve always because z is the squared sum
of both x and y
o In the original plot, red circles appear close to the origin of x and y axes,
leading to lower value of z and star rela*vely away from the origin result
to higher value of z.
In SVM, it is easy to have a linear hyper-plane between these two classes. But, another
burning ques*on which arises is, should we need to add this feature manually to have
a hyper-plane. No, SVM has a technique called the kernel trick. These are func*ons
which takes low dimensional input space and transform it to a higher dimensional
space i.e. it converts not separable problem to separable problem, these func*ons are
called kernels. It is mostly useful in non-linear separa*on problem. Simply put, it does
some extremely complex data transforma*ons, then find out the process to separate
● Pros:
o It works really well with clear margin of separa*on o It is effec*ve in high dimensional spaces.
o It is effec*ve in cases where number of dimensions is greater than the number of samples
o It uses a subset of training points in the decision func*on (called support vectors), so it is also
memory efficient.
● Cons:
o It doesn’t perform well, when we have large data set because the required training *me is higher
o It also doesn’t perform very well, when the data set has more noise i.e.
target classes are overlapping
o SVM doesn’t directly provide probability es*mates, these are calculated using an expensive five-
fold cross-valida*on. It is related SVC method of Python scikit-learn library
CHAPTER 4
SOFTWARE DESIGN AND
IMPLEMENTATION
4.1 DEDIGN AND IMPLEMENTATION
CONSTRAINTS Constraints in Analysis
Constraints in Design
♦ Determina*on of the Involved Classes
flat model, consis*ng of classes on the one hand and flat rela*ons on the other. Flat
rela*ons are preferred at the design level for reasons of simplicity and implementa*on
ease. There is no iden*ty or func*onality associated with a flat rela*on. A flat rela*on
corresponds with the rela*on concept of en*tyrela*onship modeling and many object
oriented methods.
4.2 Other Nonfunc/onal Requirements Performance Requirements
The applica*on at this side controls and communicates with the following three main
general components.
Server Tier: The server side contains the main parts of the func*onality of the
proposed architecture. The components at this *er are the following.
Web Server, Security Module, Server-Side Capturing Engine, Preprocessing Engine,
Database System, Verifica*on Engine, Output Module.
Safety Requirements
1. The so_ware may be safety-cri*cal. If so, there are issues associated
with its integrity level
2. The so_ware may not be safety-cri*cal although it forms part of a safety-
to be of that integrity level, then the hardware must be at least of the same
integrity level. 4. There is liYle point in producing 'perfect' code in some
language if hardware and system so_ware (in widest sense) are not reliable.
5. If a computer system is to run so_ware of a high integrity level then that
system should not at the same *me accommodate so_ware of a lower
integrity level.
6. Systems with different requirements for safety levels must be separated.
with one another and in what order. It is a construct of Message Sequence diagrams
are
language in the field of so_ware engineering. The standard is managed and was
created by the Object Management Group. UML includes a set of graphic nota*on
techniques to create visual models of so_ware intensive systems. This language is used
to specify, visualize, modify, construct and document the ar*facts of an object oriented
provided by a system in terms of actors, their goals and any dependencies between
those use
Actor: An actor is a person, organiza*on or external system that plays a role in one or
more interac*on with the system.
FIG 4.3: USECASE DIAGRAM
ac*ons with support for choice, itera*on and concurrency. An ac*vity diagram shows
the
4.7COLLABORATION DIAGRAM
UML Collabora*on Diagrams illustrate the rela*onship and interac*on between
so_ware objects. They require use cases, system opera*on contracts and domain
model to already exist. The collabora*on diagram illustrates messages being sent
objects.
4.8 MODULES
Data Pre-Processing
Feature Selec*on
Classifica*on Modeling
Performance Measures
Module Descrip6on
Dataset DescripKon:
The objec*ve of the dataset is to predict whether or not a pa*ent has diabetes, based
several medical predictor variables and one target variable, Outcome. Predictor
variables include the number of pregnancies the pa*ent has had, their BMI, insulin
Data Pre-Processing
Diabetes disease data is pre-processed a_er collec*on of various records. The dataset
contains a total of 769 pa*ent records, where 6 records are with some missing values.
Those 6 records have been removed from the dataset and the remaining 763 pa*ent
to iden*fy the personal informa*on of the pa*ent. The remaining 7 aYributes are
considered important as they contain vital clinical records. Clinical records are vital to
Classifica6on Modeling
The clustering of datasets is done on the basis of the variables and criteria of Decision
Tree (DT) features. Then, the classifiers are applied to each clustered dataset in order
to es*mate its performance. The best performing models are iden*fied from the
above results
● Logis*c Regression
● K Nearest neighbors
● Naive Bayes
Performance Measures:
Several standard performance metrics such as accuracy, precision and error in
classifica*on have been considered for the computa*on of performance efficacy of
this model.
Logis*c Regression: 71.42857142857143
TESTING CODING
Once the design aspect of the system is finalizes the system enters into the coding and
tes*ng phase. The coding phase brings the actual system into ac*on by conver*ng the
design of the system into the code in a given programming language. Therefore, a good
coding style has to be taken whenever changes are required it easily screwed into the
system.
CODING STANDARDS
Coding standards are guidelines to programming that focuses on the physical structure
and appearance of the program. They make the code easier to read, understand and
maintain. This phase of the system actually implements the blueprint developed
during the design phase. The coding specifica*on should be in such a way that any
programmer must be able to understand the code and can bring about changes
NAMING CONVENTIONS
Naming conven*ons of classes, data member, member func*ons, procedures etc.,
should be self-descripKve. One should even get the meaning and scope of the variable
by its name.
The conven*ons are adopted for easy understanding of the intended message by the
user.
So it is customary to follow the conven*ons. These conven*ons are as follows: Class
names Class names are problem domain equivalence and begin with capital leYer and
Member func*on and data member name begins with a lowercase leYer with each
subsequent leYers of the new words in uppercase and the rest of leYers in lowercase.
VALUE CONVENTIONS
Value conven*ons ensure values for variable at any point of *me. This involves the
following:
Proper default values for the variables.
Comments are included to minimize the number of surprises that could occur when
To achieve this, a specific format has been adopted in displaying messages to the user.
TEST PROCEDURE
SYSTEM TESTING
Tes*ng is performed to iden*fy errors. It is used for quality assurance. Tes*ng is an
integral
part of the en*re development and maintenance process. The goal of the tes*ng
during phase is to verify that the specifica*on has been accurately and completely
incorporated into the design, as well as to ensure the correctness of the design itself.
For example the design must not have any logic faults in the design is detected before
coding commences, otherwise the cost of fixing the faults will be considerably higher
errors, as a whole of the project tes*ng involves the following test cases:
Sta*c analysis is used to inves*gate the structural proper*es of the Source
code.
the module. The white-box tes*ng techniques were heavily employed for unit tes*ng.
FUNCTIONAL TESTS
Func*onal test cases involved exercising the code with nominal input values for which
the expected results are known, as well as boundary values and special values, such as
Performance Test
Stress Test
Structure Test
PERFORMANCE TEST
It determines the amount of execu*on *me spent in various parts of the unit, program
throughput, and response *me and device u*liza*on by the program unit.
STRESS TEST
Stress Test is those test designed to inten*onally break the unit. A Great deal can be
learned about the strength and limita*ons of a program by examining the manner in
STRUCTURED TEST
Structure Tests are concerned with exercising the internal logic of a program and
traversing par*cular execu*on paths. The way in which White-Box test strategy was
employed to ensure that the test cases could Guarantee that all independent paths
within a module
INTEGRATION TESTING
Integra*on tes*ng is a systema*c technique for construc*on the program structure
while at the same *me conduc*ng tests to uncover errors associated with interfacing.
i.e., integra*on tes*ng is the complete tes*ng of the set of modules which makes up
the product. The objec*ve is to take untested modules and build a program structure
tester
should iden*fy cri*cal modules. Cri*cal modules should be tested as early as possible.
One
approach is to wait un*l all the units have passed tes*ng, and then combine them and
then tested. This approach is evolved from unstructured tes*ng of small programs.
Another strategy is to construct the product in increments of tested units. A small set
of modules are integrated together and tested, to which another module is added and
tested in combina*on. And so on. The advantages of this approach are that, interface
The major error that was faced during the project is linking error. When all the modules
are combined the link is not set properly with all support files. Then we checked out
for interconnec*on and the links. Errors are localized to the new module and its
integrated in as they complete unit tes*ng. Tes*ng is completed when the last module
is integrated and
tested.
STRATERGIES TESTING
Tes*ng is a process of execu*ng a program with the intent of finding an error. A good
test case is one that has a high probability of finding an as-yet –undiscovered error. A
successful test is one that uncovers an as-yet- undiscovered error. System tes*ng is the
stage of implementa*on, which is aimed at ensuring that the system works accurately
and efficiently as expected before live opera*on commences. It verifies that the whole
set of programs hang together. System tes*ng requires a test consists of several key
ac*vi*es and steps for run program, string, system and is important in adop*ng a
successful new system. This is the last chance to detect and correct errors before the
system is installed
The so_ware tes*ng process commences once the program is created and the
documenta*on and related data structures are designed. So_ware tes*ng is essen*al
for correc*ng errors. Otherwise the program or the project is not said to be complete.
So_ware tes*ng is the cri*cal element of so_ware quality assurance and represents
the ul*mate the review of specifica*on design and coding. Tes*ng is the process of
execu*ng the program with the intent of finding the error. A good test case design is
one that as a probability of finding an yet undiscovered error. A successful test is one
undiscovered error. Any engineering product can be tested in one of the two ways:
each func*on. It is a test case design method that uses the control structure of the
procedural
design to derive test cases. Basis path tes*ng is a white box tes*ng.
Basis path tes*ng:
Flow graph nota*on
Cyclometric complexity
Deriving test cases
Graph matrices Control
to ensure that “all gears mesh”, that is the internal opera*on performs according to
a set ac*vity that can be planned in advance and conducted systema*cally. For this
reason a template for so_ware tes*ng a set of steps into which we can place specific
test case
tes*ng.
Tes*ng and Debugging are different ac*vi*es but debugging must be
which are highly prone to interface errors, should not be assumed to work instantly
when
we put them together. The problem of course, is “puxng them together”- interfacing.
There may be the chances of data lost across on another’s sub func*ons, when
combined may not produce the desired major func*on; individually acceptable
impression may be
is an error in a program statement that in violates one or more rules of the language
common syntax error. These errors are shown through error messages generated by
the computer. A logic error on the other hand deals with the incorrect data fields, out-
off-range items and invalid combina*ons. Since the compiler s will not deduct logical
error, the programmer must examine the output. Condi*on tes*ng exercises the
tes*ng each condi*on in the program the purpose of condi*on test is to deduct not
in fact, protect it from improper penetra*on. The system security must be tested for
invulnerability from frontal aYack must also be tested for invulnerability from rear
aYack.
During security, the tester places the role of individual who desires to penetrate
system.
VALIDATION TESTING
At the culmina*on of integra*on tes*ng, so_ware is completely assembled as a
package. Interfacing errors have been uncovered and corrected and a final series of
so_ware testvalida*on tes*ng begins. Valida*on tes*ng can be defined in many ways,
but a simple defini*on is that valida*on succeeds when the so_ware func*ons in
through a series of black box tests that demonstrate conformity with requirement.
A_er valida*on test has been conducted, one of two condi*ons exists.
under considera*on is tested for user acceptance by constantly keeping in touch with
prospec*ve system and user at the *me of developing and making changes whenever
The Fig 5.1 is the welcome page of the project. This page will appear once the
user or the admin open’s the portal. It is the frontend of the project or it can
also be termed as user interface. Here the user the gets the mul*ple op*ons to
The Fig 5.2 shows that the user has to register first if he or she is new in this
website. A_er successful registra*on, they get their log-in creden*als which are
provided by the admin. They use the login creden*als to log-in in the website.
every secured portal. This portal can be logged in by both admin and the user.
The admin can log-in to check the working of the portal and to maintain the
database. The user log-in to access the portal and the admin provides the
required security to the users so that the data does not get deleted or leaked.
authen*ca*on and if the log in creden*als is correct then the user can log in. It is the
frontend of the project or it can also be termed as user interface. Here the user the
gets the mul*ple op*ons to execute or access their task as per need.
The Fig 5.4 is the home page. This page is displayed a_er successful log-in. Here the
user gets the mul*ple op*ons to choose a file and upload the file. If the user does
not
The Fig 5.5 is the file upload page. Here the user has to choose the file which he
want to upload. In this page the user can access the image files from the data
set. The user can view the images and upload the images. The admin can log-in
to check
The Fig 5.6 is the result page of our project. This page is displayed a_er the image
The Fig 5.7 shows the stages of diabe*c re*nopathy with increasing severity.
Fig 5.8: Comparison of DR results
The comparison gained results with the state-of-the-art models on the Messidor
dataset in fig 5.8 shows that our AUC value is the highest compared to recent
work.
CHAPTER 6 CONCLUSION AND FUTURE WORK
6.1 CONCLUSION
This project summarizes the state of the art in diabe*c re*nopathy research
visual outcomes. Together these steps will yield beYer means to detect and
[2]
S. R. Nirmala, M. K. Nath, and S. Dandapat, “ Re*nal Image Analysis: A
Review,” Interna*onal Journal of Computer & Communica*on
Technology (IJCCT), vol-2, pp. 11- 15, 2011.
Journal
[5] Shijian Lu, et al., “ Automa*c Fundus Image Classifica*on for Computer-Aided
[8] Ahmad Fadzil, et. Al, “ Analysis of Foveal Avascular Zone in Colour Fundus
Images for Grading of Diabe*c Re*nopathy Severity” , 32nd
Annual
A. Paper work
22 % 6% 18% 7%
SIMILARITYINDEX INTERNETSOURCES PUBLICATIONS STUDENTPAPERS
PRIMARYSOURCES
1 SubmiYedtoIndianaUniversity
StudentPaper
2%
AsraMomeniPour,HadiSeyedarabi,SeyedHassanAbbasiJahro
mi,Alirez a
Javadzadeh."Automa*cDetec*onandMonitoringofDiabe*cRe*nopathyUs
ngEfficientConvolu*onalNeuralNetworksandContrastLimitedAdap*veHist
ogramEqualiza*on",IEEEAccess,2020
Publica*on
ShoravSuriyal,ChristopherDruzgalski,KumarGautam."Mobil
eassistedd
iabe*cre*nopathydetec*onusingdeepneuralnetwork",2018
GlobalMedi c
alEngineeringPhysicsExchanges/PanAmericanHealthCareExc
hanges(
GMEPE/PAHCE),2018
Publica*on
4 SubmiYedtoChinoValleyUnifiedSchoolDistrict
StudentPaper %
5 XianglongZeng,HaiquanChen,YuanLuo,
WenbinYe."AutomatedDiabe*cRe*nopathy
Detec*onBasedonBinocularSiamese-Like
%
Convolu*onalNeuralNetwork",IEEEAccess,2019
Publica*on
"NeuralNetworkTechniqueforDiabe*cRe*nopathyDetec*on",Interna*on
alJournalofEngineeringandAdvancedTechnology,2019
Publica*on
G.Kalyani,B.Janakiramaiah,A.Karuna,L.V.NarasimhaPrasad."Diabe*cre
*nopathydetec*onandclassifica*onusingcapsulenetworks",Complex&Intel
ligentSystems,2021
Publica*on
SubmiYedtoAmityUniversity
StudentPaper
1%
HaiQuanChen,XiangLongZeng,YuanLuo,WenBinYe."Detec*onofDiab
e*cRe*nopathyusingDeepNeuralNetwork",2018IEEE23rdInterna*onalC
onferenceonDigitalSignalProcessing (DSP),2018
Publica*on
1%
XiangLongZeng,HaiQuanChen,YuanLuo,WenBinYe."AutomatedDetec*on
ofDiabe*cRe*nopathyusingaBinocularSiamese-
LikeConvolu*onalNetwork",2019IEEEInterna*onalSymposiumonCircuitsa
ndSystems(ISCAS),
2019
Publica*on
www.ijritcc.or g
11 InternetSource
www.nice.org.uk
12 InternetSource 1
www.isaacpub.org
13 CommunicationandSigna
InternetSource
lProcessing,2013.
Publica*on
www.warse.org
14 InternetSource
ManishaManjra
mkar."Surv
eyofDiabeticRe
tinop
athyScreening
Methods",20
182nd
S.SaranyaRubini,A.Kun
thavai."Diabe*
cRe*nopathyDetec*onBa
sedonEige
nvalueso_heHessianMatri
x",ProcediaC
omputerScience, 2015
Publica*on
technicaljournalsonline.c
om
16 InternetSource
Gandhi,Mahe
ndran,andR
.Dhanasekara
n."Diagnosi
sofdiabeticreti
nopathyusi
ngmorphologi
calprocess a
ndSVMclassif
ier",2013I
nternationalC
onferenceo n
%
1%
1%
<1%
<1%
<1%
<1%
Interna*onalConferenceonTrendsinElectronicsandInforma*cs(ICOEI),2018
Publica*on
JaykumarLachure,A.V.Deorankar,SagarLachure
,Swati
Gupta,RomitJadhav."DiabeticRetinopathyusing
morpho
logicaloperationsandmachinelearning",2015IEE
EIntern
ationalAdvanceComputingConference(IACC),2
015
Publica*on
C. Source Code
import tensorflow
as a, sys import
tensorflow.compat
.v1 as a
a.disable_v2_beh
avior()
import os import sqlite3 as sql import base64 from flask
Flask,abort,render_template,request,redirect,url_for
import urllib
@app.route('/',
methods=['GET', 'POST'])
render_template('index.ht
ml')
def
validate(username
,password): con =
sql.connect('sta*c/
chat.db')
comple*on = False
with con:
cur = con.cursor()
for row in
rows:
dbuser
row[1]
dbpass
row[2]
if
dbuser
==
userna
me:
comple*on = (dbpass ==
@app.route('/login',
request.method == 'POST':
username =
request.form['username']
password =
request.form['password']
comple*on =
validate(username,password) if
comple*on == False: error =
again.' else:
session['username'] =
request.form['username'] return
render_template('file_upload_form.html')
return
render_template('file_upload_form.html',
error=error)
@app.route('/register', methods =
request.method == 'POST':
try:
name = request.form['name']
username =
request.form['us5e9rna
me']
password =
request.form['password']
with
sql.connect("sta*c/chat.d
b") as con:
persons(name,username,password)
VALUES
(?,?,?)",(name,username,pass
except:
con.r
ollback(
) msg =
"error
in insert
opera*
on"
finally:
return
render_template("index.html",msg =
render_template('register.html')
@ap
p.ro
ute('
/list')
def
list():
con =
sql.connect("sta
*c/chat.db")
con.row_factory
= sql.Row
cur = con.cursor()
cur.execute("select *
from persons")
rows = cur.fetchall();
render_template("file_upload_for
m.html")
@app.route('/success', methods
if request.method == 'POST':
f = request.files['file']
# change this
as you see fit
#image_path
= sys.argv[1]
image_path
=f.filename
a.gfile.FastGFile("D:/Project/Automa*c
Diabe*c_Re*nopathy_webapp/dataset/"+str(image_path), 'rb').read()
in a.gfile.GFile("models/retrained_labels.txt")]
# Unpersists graph from file with
a.gfile.FastGFile("models/retrained_graph.pb",
'rb') as f:
graph_def = a.GraphDef()
graph_def.ParseFromString(f.read())
_ = a.import_graph_def(graph_def, name='')
# Feed the image_data as input to the graph and get first predic*on
so_max_tensor = sess.graph.get_tensor_by_name('final_result:0')
predic*ons = sess.run(so_max_tensor,
{'DecodeJpeg/contents:0': image_data})
label_lines[node_id] score =
predic*ons[0][node_id] for j in
human_string,score:
print(j)
m.append(j)
app.run(debug = True)
References
[1] Feisul, M. I., & Azmi, S. (2013). National diabetes registry report.
2009-2012. Ministry of Health Malaysia.
[2] Neuwirth, J. (1988). Diabetic retinopathy: What you should know.
https://nei.nih.gov/sites/default/files/Diabetic-Retinopathy-What-
You-Should-Know-508.pdf.
[3] Vislisel, J., & Oetting, T. (2010). Diabetic retinopathy: From one
medical student to another. http://eyerounds.org/tutorials/diabetic-
retinopathy-med-students/Diabetic-Retinopathy-medical-
students.pdf.
[4] Diabetes UK. (2006). What is diabetes.
http://www.godnaturalcures.com/healthc/PDF%207%20EBOOKS/
natural-help-for-diabetes.pdf.
[5] Antonetti, D., Klein, R., & Gardener, T., Diabetic retinopathy.
(2012). https://www.aoa.org/patients-and-public/eye-and-vision-
problems/glossary-of-eye-and-vision-conditions/diabetic-
retinopathy.
[6] Ophthalmic Photographers' Society. Fundus photography overview.
https://www.opsweb.org/page/fundusphotography.
[7] Poornima, S. V., Nishchala, T. K., & Umamakeswari, A. (2014).
Detection of diabetic retinopathy by applying total varia-
tion. Biomedical Research, 25(4), 560–563.
[8] Decencière, E., Zhang, X., Cazuguel, G., Lay, B., Cochener, B.,
Trone, C., P. Gain, R. Ordonez, P. Massin, A. Erginay, & Charton,
B. (2014). Feedback on a publicly distributed image database: The
Messidor database. Image Analysis and Stereology, 33(3), 231-234.