Detection of Eye Disease in Retinal Images Based on Haar Wavelets Tokhir Urazmatov Information Technology department Urgench branch of Tashkent University of Information Technologies named after Muhammad al-Khwarizmi Urgench, Uzbekistan 0000-0003-0704-982X Khurmatbek Otamuratov Information Technology department Urgench branch of Tashkent University of Information Technologies named after Muhammad al-Khwarizmi Urgench, Uzbekistan 0000-0003-3553-7054 Odamboy Djumanazarov Information Technology department Urgench branch of Tashkent University of Information Technologies named after Muhammad al-Khwarizmi Urgench, Uzbekistan 0000-0002-5284-207X Janar Yusupova Department of Software Engineering Urgench Branch of Tashkent University of Information Technology named after Muhammad al Khwarizmi Urgench, Uzbekistan yusupovajanar1992 @gmail.com Abstract—It is known that there are many eye diseases in the world nowadays. Diabetic retinopathy is one of the diseases that lead to blindness. This disease is observed especially in premature babies, early detection and correct diagnosis of this disease is an urgent issue today. In order to detect this disease, highly qualified ophthalmologists are needed to observe the process in the retinal or fundus images of the eye. Unfortunately, the number of leading specialists in eye diseases is very small in today's growing population. The method proposed in this article is used to classify the image data processed on the basis of Haar wavelets in the detection of retinopathy in the eye using inference tree and ResNet. Until now, a lot of research is being conducted on such classification systems, but when it comes to human health, these systems need to be further improved and more accurate. Fundus images were downloaded from open source for this research. In the research conducted, the accuracy was 86% with ResNet and 78% with inference tree. 2. Advanced diabetic retinopathy. At this stage, the retina is not supplied with enough oxygen, which causes the growth of weak and easily ruptured blood vessels. This condition can cause bleeding into the clear fluid inside the eye. Keywords—diabetic retinopathy, decision tree, ResNet, haar wavelet, machine learning I. INRODUCRION Nowadays, many eye diseases are observed all over the world. One of them is diabetic retinopathy. This disease can develop without any symptoms. Sufferers of this disease are often found in those who regularly have more than enough sugar in their blood. This disease is a type of disease caused by damage to the vessels of the retinal part of the eye. Diabetic retinopathy is one of the main diseases that eventually lead to blindness if not diagnosed early and not examined by a qualified specialist. In order to identify this disease, the ophthalmologist observes the retinal or fundus images and blood vessel changes in them and makes a diagnosis based on his experience. There are two main types of diabetic retinopathy: 1. Primary diabetic retinopathy. This is the most common and the first step. At this stage, small changes appear in the vessels of the retina. In this case, the permeability of the vessels decreases, and small bleedings appear. This process has almost no effect on the eyesight. Therefore, it is very difficult for an ophthalmologist to notice this process. Global and local statistics on people with diabetic retinopathy are reported in various sources, but they change frequently and the latest research and reports from health organizations should be consulted for the latest information. According to the general data until 2023: • Worldwide: Two out of every three people with diabetes may have some form of diabetic retinopathy. According to the World Health Organization (WHO), there are approximately 422 million people with diabetes, indicating that diabetic retinopathy is very common. Many scientists of the world are focusing on these research to increase accuracy as a result of their methods and algorithms. For example, Salvathi [1] achieved some accuracy by extracting gray image information from images in their theory. Doaa Youssef [2] used the method of separating images into segments and extracting symbols in his scientific works. As a result, 78% of the results were achieved in the classification of diseases. Badsha [3] and other scientists conducted a number of scientific studies with the method of extracting blood vessels from the retina. II. METHODS AND ALGORITHMS Fig. 1 presents the main model.The image is divided into blocks of equal size and the optical disk is separated. Since the optic disk is centered in the image, each block is decomposed by standard two-band wavelet transforms.[4] In this search, the fundus images are first downloaded and the RGB components are extracted. Haar wavelet is used for all extracted R,G,B.[5] The proposed method is detailed below: A. Dataset B. Pre-processing Diabetic retinopathy is often diagnosed using fundus imaging. By analyzing fundus images, ophthalmologists and artificial intelligence (AI) software can identify changes in the retina, (Fig. 2) particularly the characteristic signs and degrees of diabetic retinopathy.[6] This process includes the following steps: All downloaded images are initially scaled to the same size, RGB components are extracted. After that, Haar wavelet is applied to each component and its horizontal, vertical and diagonal coefficients are extracted.[8] 1. Fundus Photography: This process involves exposing and recording an image of the inside of the eye (fundus). Usually, this procedure is performed by direct or indirect ophthalmoscopy of the eye, including the eye vessels, optic disc, and retina. 2. Evaluation of images: Traditionally, ophthalmologists evaluate the presence of changes in the retina and their characteristics by reviewing the fundus photo image. Diabetic retinopathy has the following main symptoms: • Microaneurysms: Small swellings in retinal vessels. • Dot and Fleck Hemorrhages: Small, point-shaped hemorrhages. • Exudates: Accumulation of fatty or proteinaceous substances in the retina. Usually, they appear white or yellow. • Neovascularization: Formation of new but weak and easily bleeding vessels.[7] Application of Haar wavelet Haar Wavelet and wavelet transforms in general perform important tasks in signal and image processing. The Haar wavelet, like other types of wavelets, allows you to separate data into smaller components and identify important features among the data. This process is mainly done by separating the signal into components in different frequency bands, which makes it easier to analyze the signal and reconstruct it. Some of the main functions of the Haar wavelet are: 1. Compression: Wavelet transform allows for efficient compression of signal or image data. This process is often important for storing and transferring data in a short amount of time or with less memory. The Haar wavelet transform performs compression by removing redundant parts of the data (ie, the "noisy" parts of the data). 2. Analysis: Separating the data signal into different frequency bands is another important task of the Haar wavelet transform. This allows you to analyze the signal and separate its parts. For example, by separating the low- and high-frequency components of a signal, it is possible to distinguish between data that should remain in the background and visible changes. 3. Noise Reduction: Haar wavelet transform plays an important role in reducing noise in signals and images. By extracting the noise from the original signal data and further processing it, a cleaner and more accurate signal can be reconstructed. 4. Quick Analysis: The Haar wavelet transform can be very computationally efficient because it uses simple addition and subtraction operations. This is especially important for real-time applications that require fast analysis. Fig. 1. The main method. 5. Digital Image Recovery: There is a high degree of correlation between digital images, and the Haar wavelet transform is used to compress and reconstruct the images by emphasizing this correlation. In this case, the size of the image is significantly reduced, while maintaining the original quality of the image. Because the Haar wavelet transform is accurate and efficient, this method is widely used in many applications, including signal processing, digital image processing, financial data analysis, and many others. [9] The Haar wavelet performs one-level, two-dimensional decomposition. This forms a matrix of coefficients (CA) based on the horizontal coefficient (CH), vertical coefficient (CV) and diagonal coefficient (CD). Given the Haar function (Fig. 3): Fig. 2. Normal and Retinopathy eye image. ⎧1 0 ⎪ ≡ 1 ⎨ 1 2 ⎪ ⎩ 0 1 , 2 . 1, Its scaling function Φ(t) can be expressed as: 1 0 0 Φ 1, . 4. -. . 5. ?. & # 6. % ) ∑ /0 123456315 7 89:;;565<=:3=:>< 7 ∑ /0 123456315 @ ∑ 89:;;565<=:3=:>< @ ∗ ; ; . Using the decision tree (Fig.4), the data is analyzed from the root of the tree to the last node, and based on this analysis, the image is separated into a diseased or healthy eye. A structured tree is constructed as follows: Fig. 4. Decision tree structure. The uploaded data contains a total of 1038 images, 648 of which are retinopathy-diagnosed images by experts, and the remaining 390 images are normal, i.e., healthy eye images. Results were obtained and compared using inference tree and ResNet. The results were compared using the equations of sensitivity, specificity and accuracy. % # # # ) Fig. 3. Extract the coefficients. Decomposition matrices obtained from RGB channels are used for feature extraction using Haar transform. As mentioned above, horizontal, vertical and diagonal coefficients make up this matrix. In this case, RGB components are extracted from images, coefficients are extracted based on haar changes, and a matrix is created based on these coefficients. Here, the process of extracting coefficients of fundus images using haar is shown.[8] The image entered in the previous process is converted to grayscale format. After that, the horizontal, vertical and diagonal coefficients are extracted using haar. Each pixel in the image is equal to the intensity. These intensities form a histogram.[10] Any features can be extracted from this histogram. Evaluation of their average, variable, curvature, energy and other intensities is calculated using the following equations. 1. 2. 3. "#$$ ∑ ∗ % # #&% % & ) ; ∑' ∗ ∑ ∗ log ( ; ; -#$#-# ) --. TABLE I. -) A' ; A' B CD AD ; AD B C' A' B AD . & THE INFERENCE TREE IS THE CONFUSION MATRIX retinopathy 76 10 retinopathy normal TABLE II. normal 24 40 RESNET CONFUSION MATRIX retinopathy 82 6 retinopathy normal III. normal 18 44 CONCLUSIONS In this article, a system for detecting diabetic retinopathy in the eye using eye images was proposed. Retinal images are mainly examined by an ophthalmologist and then diagnosed. Based on this proposed system, the retinal images will be analyzed and help the doctor make a diagnosis. These images are first contrast enhanced using the Clahe function and then processed using Haar. This method helps to reduce calculations and increase accuracy. The proposed method and obtained results are presented. During this research, the use of Haar wavelets in image processing helped to further increase the accuracy. In the obtained results, sensitivity was 87%, specificity was 80%, and accuracy was 85%. Two classifiers were used and the results were compared. These results were compared with the results of previous systems and the shortcomings were analyzed. the proposed method can be further improved and applied to processing and analysis of other images. REFERENCES [1] [2] [3] D. Selvathi, N.B. Prakash and Neethi balagopal, “Automatic detection of diabetic retinopathy for early diagnosis using feature extraction and support vector machine,” IJTAE. Vol. 2, Issue 11, Nov. 2012 Doaa Youssef, Nahed Solouma, Amr El-dib, Mai Mabrouk, “New Feature-Based Detection of Blood Vessels and Exudates in Color Fundus Images,” IEEE conference on Image Processing Theory, Tools and Applications,2010,vol.16,pp.294-299. S. Zhang, C. Zhu, J. K. O. Sin, and P. K. T. Mok, “A novel ultrathin elevated channel low-temperature poly-Si TFT,” IEEE Electron Device Lett., vol. 20, pp. 569–571, Nov. 1999. [4] H. Yu, S. Barriga and C. Agurtho, “Fast localization of Optic disc and fovea in retinal image for eye disease screening,” vision quest bio medical, 1994. [5] Narang, Arun, Gautam Narang, and Sushil Singh. “Detection of hard exudates in colored retinal fundus images using the Support Vector Machine classifier,” Image and Signal Processing (CISP), 2013 6th International Congress on. Vol. 2. IEEE, 2013. [6] Mr. R. Vijayamadheswaran, Dr.M.Arthanari, Mr.M.Sivakumar, “Detection of diabetic retinopathy using radial basis function. International journal of innovative technology and creative engineering,” Vol.1, No.1, pp: 40-47, 2011. [7] Imran, Muhammad, Rathiah Hashim, and Noor Eliza Abd Khalid, “Color Histogram and First Order Statistics for Content Based Image Retrieval,” Recent Advances on Soft Computing and Data Mining. Springer International Publishing, 2014. 153-162. [8] C. Bhuvaneswari, P. Aruna, and D. Loganathan, “Classification of Lung Diseases by Image Processing Techniques Using Computed Tomography Images,” International Journal of Advanced Computer Research 4.1 (2014): 87. [9] K.S. Kuzibaev, T.K. Urazmatov, B.B. Nurmetova, “The use of Big Data in the field healthcare: Uzbekistan and foreign experience,” 2022 International Conference on Information Science and Communications Technologies (ICISCT). [10] T. Urazmatov, O. Khujaev, K. Kuzibaev, “Models and algorithms for analyzing chatbot and user data in real-time systems,” 2022 International Conference on Information Science and Communications Technologies (ICISCT).