# A Deep Learning Model for Detecting Diabetic Retinopathy Stages with Discrete Wavelet Transform
## 5 Discussion  
The proposed study employs a CNN model with preprocessing methods such as CLAHE and DWT (Figure 4). The model predicts five stages of DR. Not all previous studies utilized different datasets for evaluation, which lacks the model's generalizability. Significantly, few studies are related to CLAHE and DWT preprocessing with DR image data. Adam is frequently used due to its broad usefulness across various situations. Because of its ability to traverse the optimization landscape efficiently, Adam is one of the most often used optimizers for deep learning model training [64]. The performance comparison of the study with previous research is illustrated in Table 7.  
Although our CNN model's accuracy of 70% and AUC of 0.82 may seem minor in comparison, we feel our work brings substantial value to the area of DR identification for the following reasons:  
* Data Integration Approach: Our work stands out due to its unique method of merging the APTOS and DDR datasets, improving the model's robustness and mitigating generalizability concerns. This approach not only tackles biases peculiar to the dataset but also guarantees an easy adjustment of our model to real-world situations in many populations.
* Integration of DWT in Image Preprocessing: It is a substantial methodological progress in the processing and categorization of DR pictures. DWT helps to highlight the intricate features in the retinal pictures essential for precisely recognizing the different DR phases. This hybrid methodology not only amplifies the process of extracting distinctive characteristics but also boosts the model's responsiveness to the smallest signs of advancing illness.
* Foundation for Future Research: Although our findings offer a strong foundation for future research, we acknowledge the need for ongoing enhancement. Our work provides explicit guidelines for future research aimed at improving accuracy and AUC scores to a greater extent.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Optimizer** & **Class 0** & **Class 1** & **Class 2** & **Class 3** & **Class 4** \\ \hline Adam & 0.9781 & 0.8461 & 0.9646 & 0.7626 & 0.8897 \\ SGD & 0.9633 & 0.8209 & 0.8414 & 0.7740 & 0.7756 \\ Adamax & 0.9504 & 0.8000 & 0.8190 & 0.8267 & 0.7681 \\ Adagrad & 0.9719 & 0.7765 & 0.9499 & 0.7629 & 0.8739 \\ RMSProp & 0.9715 & 0.7877 & 0.9502 & 0.7963 & 0.8604 \\ \hline \hline \end{tabular}
\end{table}
Table 6: The AUC scores of the test results.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Reference** & **Year** & **Model** & **Class Type** & **Dataset** & **Accuracy** & **F1-Score** & **AUC** \\ \hline [69] & 2021 & InceptionResNetV2 & 5-class & DDR & 52.50\% & - & 0.80 \\ \hline [70] & 2022 & CNN & 5-class & DDR & 66.68\% & - & - \\ \hline [53] & 2023 & Vision Transformer & 6-class & DDR & 91.54\% & 0.67 & - \\ \hline [45] & 2024 & Swin Transformer, DWT & 5-class & APTOS & 86.00\% & - & - \\ \hline Proposed model & CNN with CLAHE, DWT & 5-class & APTOS + DDR & 71.85\% & 0.71 & 0.90 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Comparison of the proposed study with previous studies.