METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi Vol. 9 No. 1 (April 2. ISSN: 2598-8565 . edia ceta. ISSN: 2620-4339 . edia onlin. GRADE CLASSIFICATION OF DIABETIC RETINOPATHY BASED ON SINGLE MODEL CONVOLUTIONAL NEURAL NETWORK Desti FitriatiA. Sri Rezeki Candra Nursari Program Studi Teknik Informatika. Fakultas Teknik. Universitas Pancasila. Jakarta. Indonesia Email: desti. fitriati@univpancasila. DOI: https://doi. org/10. 46880/jmika. Vol9No1. ABSTRACT Diabetes Mellitus (DM) is one of the diseases that has attracted global attention because it ranks fourth as a noncommunicable disease with the highest mortality rate after cardiovascular, cancer, chronic respiratory diseases. DR is a condition caused by diabetes that can cause permanent damage to the blood vessels of the retina which can lead to blindness. DR is divided into 2 stages, namely non-proliferative diabetic retinopathy (NPDR) and proliferative diabetic retinopathy (DR), where each stage has different characteristics. From several studies that have been conducted previously. Convolutional Neural Network (CNN) has been widely used in recent years to segment medical images with remarkably consistent results. However, it is still necessary to find a suitable model to be able to adapt to all existing variables. For this reason, this study proposes a method as a modified model of CNN using seven layer. From the results of the research conducted, the proposed method uses four class models, namely 5 classes, 3 classes, 2 classes (Healthy & DR), and 2 classes (Healthy & Moderat. This research produced accuracy rates of 52%, 68%, 92% and 84% respectively. Keyword: Diabetic Retinopathy. Convolutional Neural Network. Non-proliferative DR. Proliferative DR. INTRODUCTION Diabetes Mellitus (DM) is one of the diseases that has attracted global attention because it ranks fourth as a non-communicable disease with the highest mortality rate after cardiovascular, cancer, chronic respiratory diseases as mentioned by World Health Organization in 2023. This disease is a metabolic disease characterized by chronic hyperglycemia caused by damage or deficiency of insulin secretion, damage to the response to the insulin hormone or both (Webber, 2. The International Diabetes Federation (IDF) in 2022 reported that 537 million adults . -79 year. were living with diabetes worldwide. This number is expected to increase to 643 million . in 9 adult. in 2030 and 784 million . in 8 adult. The 10th edition of the IDF Atlas states that in Indonesia, the estimated population of adult diabetes aged 20-79 years is 19,465,100 people. Meanwhile, the total adult population aged 20-79 years is 179,720,500, so if calculated from these two figures, it is known that the prevalence of diabetes in the age group between 2079 years is 10. This can be interpreted that in the 20-79 age group there are 1 in 9 people with diabetes. The death rate related to diabetes in the age group of 20-79 years in Indonesia is estimated at 236,711. Meanwhile, the proportion of undiagnosed diabetes patients in the 20-79 age group who are undiagnosed is 7% (Alberti, 1. One of the organs affected by diabetes is the The eyes are one of the most important organs in the human body. The Retina. Optic Disc. Macula are all located inside the eye, facing the lens. during an eye exam, this can be determined by peering through the pupil (Chetoui et al. , 2. A condition caused by diabetes that can cause permanent damage to the blood vessels of the retina which can lead to blindness is Diabetic Retinopathy (DR) (Vij & Arora, 2. DR is a serious, sight-threatening disease that if left untreated will be the main cause of visual impairment, especially in working-age adults. DR in the early stages does not have any symptoms, but some people may experience some changes in their vision, such as difficulty reading and seeing objects that are far away. After that, the blood vessels in the retina begin to bleed like a gel fluid. According to statistics, 80% of DM patients suffer from DR and struggle for 15-20 years (Elgafi et al. , 2. DR is considered one of the most common diseases causing vision loss in the community. The severity of DR is correlated with the duration, blood glucose DR is divided into 2 stages, namely NonProliferative DR (NPDR) and Proliferative DR (PDR). NPDR is the initial stage that causes vision-related problems such as microaneurysms, bleeding. Exudates and Macular Edema. While PDR occurs after NPDR develops and can cause vitreous hemorrhage and retinal traction detachment. DR can be identified by the Halaman 50 METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi Vol. 9 No. 1 (April 2. presence of various lesions found in the retinal image, namely microaneurysms, bleeding, soft exudates and hard exudates (Ullah et al. , 2. The classification of DR into 5 categories has been identified by several researchers, namely the normal, mild, moderate, severe, and PDR categories which require colored retinal image processing by an Opthamologist (Ahmad et al. , 2. DR analysis and identification are difficult to do manually due to the high potential for human error. Various computerbased methods have been used to identify DR. Research was conducted to display blood vessels in the retina but could not distinguish between early and late stages of DR. DR is categorized into several stages using Artificial Neural Network (ANN). The resulting accuracy and efficiency increased in the experiment (Dhivya et al. , 2. Many fields including medical image classification have adopted Deep Learning (DL) as conducted by (Phridviraj et al. , 2. The research began because in remote or densely populated areas, such as India and Africa, the number of ophthalmologists is very small, resulting in a sharp increase in the prevalence of diabetes and diabetic For this reason, a model was created that can detect DR and Non-DR. The evaluation of the results used were precision. F1 Score, and accuracy, which reached 96. 99%, 93. 98%, and 96. The limitation of this study is the small variation of data. The research conducted by (Kumari et al. , 2. is quite different from several other researchers because the input data used is the result of a montage of several retinal images. This study performs automatic detection for 2 classes, namely NPDR and PDR. Image preprocessing is carried out by reducing the local average color value of the original high-resolution montage image mapped to a grayscale image by 50% to eliminate color differences caused by different Ophthalmoscopes. Then noise removal using Gaussian The pre-trained results are continued to classify NPDR and PDR Xgboost Algorithm with an accuracy of 94%. Some researchers suggest approaches to detect blood disorders . Hard and soft exudates, and micro-aneurysm. on the retina using Deep Learning models. The weakness of this model causes performance degradation and requires high training The solution provided is to create an automatic detection model using CNN and residual blocks. The weakness of this research is that there is a decrease in performance and requires a lot of training time ISSN: 2598-8565 . edia ceta. ISSN: 2620-4339 . edia onlin. (Kommaraju & Anbarasi, 2. Research that proposes a modified CNN method with the aim of improving model performance. The proposed method is a combination of 3 sets of Convolution, namely Max polling layer. Convolutional Layer. ReLu (Reactified Linear Uni. There are 2 class outputs used, namely NPDR and PDR. However, other evaluation measurements are needed to maximize the desired performance measures using various datasets and clinical images in the form of DR lesions (Reddy & Narayanan, 2. From several studies that have been conducted previously, it can be seen that Convolutional Neural Network (CNN) has been widely used in recent years to segment medical images with remarkably consistent CNN is a deep learning based neural network designed to process array data with minimal preprocessing. CNN has been widely used in many applications such as image processing (Sangeetha et al. However, it is still necessary to find a suitable model to be able to adapt to all existing variables. For this reason, this study proposes a method as a modified model of CNN by using seven layer to get optimize RESEARCH METHOD The flowchart of the proposed CNN method for modeling in classifying DR can be seen in the following Fig. Contribution Figure 1. Proposed Method Dataset The data used in the study used secondary data downloaded from Kaggle . ttps://w. com/ in the form of retinal images with a total of 2,150 image data processed. The images obtained are divided into several conditions that describe the level of eye health of the patient, namely healthy, mild, moderate. Halaman 51 METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi Vol. 9 No. 1 (April 2. Proliferate, and Severe. Table 1 shows the number of images from each class. Table 1. Variation of Dataset Class Description N-Data Healthy Mild Moderate Proliferate Severe Healthy retina Mikro-Aneurism (MA) Haemorrhage Intraretinal venous bleeding occurs The emergence of Total Figure 2 below is a retinal image that clarifies the visualization of the differences between each class. ISSN: 2598-8565 . edia ceta. ISSN: 2620-4339 . edia onlin. Dense layer is defined with 128 units and ReLU activation function. ReLU is an activation function commonly used in neural network layers because it is simple and allows the model to learn quickly Dropout layer, defined with a dropout rate of 0. which means that 20% of the units in the previous layer will be randomly ignored during the training This helps reduce dependencies between units in the previous layer and prevents overfitting of the model. Output layer with softmax activation function with output neurons of a number of data classes. In this study, modeling will be carried out with several different output classes, namely: Output 5 classes, namely Healthy. Mild. Moderate. Proliferate, and Severe Output 3 classes, namely Healthy. Moderate . ombining Mild and Moderate classe. , and Severe . ombining Proliferate and Severe classe. Output 2 classes, namely Healthy and DR . ombining Mild. Moderate. Proliferate, and Severe Output 2 classes, namely Healthy and Moderate . ithout combining other classe. From the four models above, training will be carried out with the same data. Table II shown the composition of the data used in the training, validation and testing processes. Table 2. Data Composition Figure 2. Retina Images with Various of Classes Computation Method This study utilizes Machine Learning using the Convolutional Neural Network (CNN) method with an architecture consisting of several layers as follows: Conv2d layer. The layers used consist of 64, 16, 32, 64 filters with each using a 2x2 kernel and 128 filters using a 3x3 kernel and all Conv2d layers use Rectified Linear Unit Activation (ReLU). ReLU has an expression, namely . = max . , yc. so that when the data is greater than zero, the ReLU function is used to calculate the rare ability. Max_pooling2d layer, using a 2x2 kernel. Batch_normalization layer, which is always used after MaxPooling2d layer. Flatten layer is a type of layer in deep learning model architecture that is used to flatten multidimensional input into a one-dimensional array. Description Training Validation Testing Total Data N-Data RESULT AND DISCUSSION From modeling for each class, the following results were obtained: Training and Validation for Five Class After processing the data using 5 classes with Healthy. Mild. Moderate. Proliferate, and Severe, the results were obtained by looking at the accuracy of the testing data as in the following Fig. Halaman 52 METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi Vol. 9 No. 1 (April 2. ISSN: 2598-8565 . edia ceta. ISSN: 2620-4339 . edia onlin. Table 4. Confusion Matrix of Three Class Figure 3. Training and Validation Accuracy of Five Class For the healthy class, it was found that from the 5-testing data, all of them were accurately included in the healthy class. Meanwhile, for the mild, moderate, proliferate and severe classes, there is still testing data that does not match the class it should be. This research result can be seen in Table i below. Healthy Moderat Severe Healthy Mild Moderate Proliferativ Severe Training and Validation for Two Class Accuracy using 2 classes with the use of Healthy and DR classes . ombining Mild. Moderate. Proliferate, and Severe classe. , the accuracy can be seen in the following Fig. Table 3. Confusion Matrix of Five Class Healthy Mild Proliferativ Severe Moderat Healthy Mild Moderate Proliferati Severe Training and Validation for Three Class Here is the visualization of training and Validation accuracy for three classes by seen Fig. Figure 4. Training and Validation Accuracy of Three Class Figure 5. Training and Validation Accuracy of Two Class (Healthy and DR) The confusion matrix of two classes. Healthy and DR, can be seen on Table V below. Table 5. Confusion Matrix of two Class (Healty and DR) Healthy Healthy Moderate Mild Moderate Proliferative Severe Apart from the classification of the 2 classes above, this study also classified 2 other classes with healthy and moderate categories, in which Moderate classes without combining other classes. The accuracy can be seen in the following Fig. After processing the data using 3 classes, namely Healthy. Moderate . ombining the Mild and Moderate classe. , and Severe . ombining the Proliferate and Severe classe. , the confusion matrix results were obtained as shown in the following Table Halaman 53 METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi Vol. 9 No. 1 (April 2. Table 7. Comparison of Accuracy Result Scheme Accuracy 5 class (Healthy. Mild. Moderate. Proliferative. Sever. 3 class (Healthy. Mild. Moderat. 2 class (DR and Health. 2 class (DR and Moderat. Figure 6. Training and Validation Accuracy of Two Class (Healthy and Moderat. Table 6 below shown the result of confusion matrix from two classes (Healthy and Moderat. Table 6. Confusion Matrix of Two Class (Healthy and Moderat. Healthy Moderate Healthy Mild Moderate Proliferative Severe DISCUSSION This study conducted 4 experiments using the proposed method into 4 classification schemes with data in the form of retinal images with a total of 2,750 image data processed. The distribution of healthy classes obtained was greater than other classes, where the average number of data for each class other than healthy was 300. Based on the results of the trial, it was found that the classification of a few classes had much greater accuracy results compared to other schemes. This shows that the amount of data variation also affects the classification results. Errors in class categorization also occur due to data imbalance, where there are not many data variations that can be used to test new input. So to avoid this problem, further research can use the augmentation method to enrich the input data. The method proposed in this study has been able to provide very good accuracy results for 2 classes, reaching 94% for the healthy and DR classes, and 84% for the healthy and moderate classes. whereas for a larger number of classes the accuracy is not as good as the 2-class classification, where the accuracy results are 52% for 5 classes and 68% for 3 classes. This investigation shows that the proposed method can detect diabetic retinopathy with an acceptable degree of Table VII below shown the accuracy of the scheme from this research. ISSN: 2598-8565 . edia ceta. ISSN: 2620-4339 . edia onlin. CONCLUSION From the results of the research conducted, the proposed method (Modified CNN using 7 layer. uses four class models, namely 5 classes, 3 classes, 2 classes (Healthy & DR), and 2 classes (Healthy & Moderat. This research produced accuracy rates of 52%, 68%, 92% and 84% respectively. It can be concluded that the fewer number of output classes will produce a higher accuracy value so that to get optimal detection results, detection with 2 classes can be an option. Accuracy results that are less than optimal for detecting more than 2 classes are caused by small data variations resulting in overfitting. Therefore, in further research, using data augmentation could be an option. Apart from that, optimization can also be added by modifying the CNN architecture and adding image preprocessing to improve image quality. DISEMINATION This article has been disseminated at the National Seminar on Information and Communication Technology (SEMNASTIK) APTIKOM Year 2024 held by Universitas Methodist Indonesia on October 24-26, 2024. REFERENCES