# A Deep Learning Model for Detecting Diabetic Retinopathy Stages with Discrete Wavelet Transform
## 1 Introduction  
Diabetes is a debilitating, persistent condition characterized by an insufficient production or use of insulin in the body. The count of individuals aged 20 to 79 with diabetes is supposed to increase from 536.6 million in 2021 to 783.2 million by 2045 [1]. Type 1 and Type 2 are its two forms. Retinopathy usually strikes 60% of type 2 diabetics and nearly all type 1 diabetics in the 20 years after diagnosis. The worldwide occurrence of diabetes has been reported to be 9.8% [2]. Diabetic retinopathy (DR) is the main underlying factor behind worldwide vision loss, impacting around 33% of individuals diagnosed with diabetes. Consequently, timely diagnosis and therapy of DR can significantly diminish the likelihood of permanent visual impairment, eye floaters, and eventual vision loss. Within 20 years of diagnosis, retinopathy impacts around 60% of patients with type 2 diabetes and nearly all with type 1 diabetes. Nevertheless, DR can progress without exhibiting any symptoms until it poses a risk to vision. Manually inspecting and determining the severity of DR requires a significant amount of time and is prone to errors. Precise evaluation of the impact of DR requires highly experienced ophthalmology skills [3]. The screening approach depends on an expert's evaluation of color fundus photographs, often misdiagnosing several instances and delaying treatment [4]. Medical imaging has employed deep learning algorithms for disease screening and detection. Diverse approaches are used to identify DR at its earlier stages, with machine learning playing a significant part. Artificial intelligence employs machine learning techniques to enhance the learning process independently, eliminating direct human interaction. Deep learning is often used in predicting medical conditions [5]. Deep learning and machine learning offer advantages in many fields, including computer vision, medical image analysis, and fraud detection systems [6; 7]. Deep learning extracts fundamental features from massive datasets, utilizing feature extraction, which data mining tools assess and predict. These algorithms anticipate optimal, exact outputs, simplifying early illness forecasts and saving millions of lives [8]. Computer vision and medical image processing applications extensively use deep learning techniques, notably convolutional neural networks (CNNs) [8; 9; 10; 11; 12]. Most conventional techniques cannot reveal hidden characteristics and their relationships. Instead of learning valuable information, they retain useless features such as size, brightness, and rotation, decreasing performance and accuracy [13]. Another concern is that irrelevant anatomical differences or other extraneous information in retinal images might hamper the model's generalization capacity. Although not essential for the main diagnostic objective, these subtleties may lead to overfitting of the model. When the model is used on other datasets that do not have the same incidental characteristics, this overfitting might make it less valuable. It is crucial to build and train the model using pertinent factors that are constant over various datasets to overcome this issue. It will increase the model's durability and flexibility in clinical situations [14]. Non-proliferative (NonPrDR) and proliferative (PrDR) are the two primary stages of DR. NonPrDR refers to the initial stages of DR and can be mild, moderate, and severe. Conversely, PrDR is the advanced stage of the illness. Many people do not experience symptoms until the disease progresses to the PrDR stage [15]. Figure 1 shows several stages of retinal imaging with DR from the Asia-Pacific Tele-Ophthalmology Society (APTOS) dataset [16]. The combination of machine learning and deep learning indicates the potential to transform the categorization of DR [17]. However, demand is increasing for automated technologies that can efficiently evaluate vast datasets while maintaining high accuracy due to the growing volume of collected patient data.