Classification of Chronic Kidney Disease in Sonography Using the GLCM and Artificial Neural Network

Chronic kidney disease (CKD) can be treated if it is detected early, but as the disease progresses, recovery becomes impossible. Eventually, renal replacement therapy such as transplantation or dialysis is necessary. Ultrasound is a test method with which to diagnose kidney cancer, inflammatory disease, nodular disease, chronic kidney disease, etc. It is used to determine the degree of inflammation using information such as the kidney size and internal echo characteristics. The degree of the progression of chronic kidney disease in the current clinical trial is based on the value of the glomerular filtration rate. However, changes in the degree of inflammation and disease can even be observed with ultrasound. In this study, from a total of 741 images, 251 normal kidney images, 328 mild and moderate CKD images, and 162 severe CKD images were tested. In order to diagnose CKD in clinical practice, three ROIs were set: the cortex of the kidney, the boundary between the cortex and medulla, and the medulla, which are areas examined to obtain information from ultrasound images. Parameters were extracted from each ROI using the GLCM algorithm, which is widely used in ultrasound image analysis. When each parameter was extracted from the three areas, a total of 57 GLCM parameters were extracted. Finally, a total of 58 parameters were used by adding information on the size of the kidney, which is important for the diagnosis of chronic kidney disease. The artificial neural network (ANN) was composed of 58 input parameters, 10 hidden layers, and 3 output layers (normal, mild and moderate CKD, and severe CKD). Using the ANN model, the final classification rate was 95.4%, the epoch needed for training was 38 times, and the misclassification rate was 4.6%.


Introduction
Chronic kidney disease (CKD) is increasing with the aging of the population and the increase in chronic diseases. In many countries, it is a concerning health problem causing a high prevalence and incidence of stroke, heart disease, and complications such as diabetes and infection, as well as increases in medical expenses [1,2]. Chronic kidney disease is used as a general term that refers to kidney damage for more than 3 months or a continuous decrease in kidney function regardless of the cause. It is a disease that increases the risk of cardiocerebrovascular disease and is accompanied by kidney failure and various complications [3,4]. The following definition of chronic kidney disease is widely used by the National Kidney Foundation (NKF): "if the kidney damage, such as proteinuria, hematuria, or pathological abnormality, or glomerular filtration rate is less than 60 mL/min/1.73 m 2 and lasts for more than 3 months" [5]. Chronic kidney disease has various causes and pathological findings, but clinically, it can be confirmed relatively simply through a urine test to detect proteinuria and a blood test to estimate the glomerular filtration rate. In the clinical field, the stage of chronic kidney disease is divided into five stages from stage 1 to stage 5 according to the estimated glomerular filtration rate for

Subjects and Data Acquisition
From January 2015 to December 2017, the experiment was performed using ultrasound images of volunteers who visited the hospital for medical examination at R Hospital in Yangsan, Gyeong-sang-nam-do, and patients diagnosed with CKD. Table 1 shows the clinical characteristics of subjects. A total of 741 ultrasound images were used, including 251 normal images, 328 mild and moderate CKD images, and 162 severe CKD images, classified by the medical doctor. Radiologists classified the experimental images into those of mild and moderate CKD patients and severe CKD patients by reading, and cases with kidney cancer, renal cysts, and congenital diseases of the kidney were excluded from the experiment [13].
Regarding the experimental equipment, an RS80A (Samsung Medison, Seoul, Korea) ultrasound device was used, and the image conditions were acquired with a gain of 50, dynamic range of 56, frame average of 8, power of 95, and general frequency. All tests were conducted under voluntary participation and were approved by the Institutional Review Board (IRB) of the Catholic University of Busan (CUPIRB-2017-023). Table 1 shows the information on the age, sex, eGFR, hypertension, and diabetes of the test subjects.

Experimental Method
The region of interest (ROI) was set in the ultrasound image of the kidney, and the result was calculated using MATLAB 2016a (MathWorks Inc., Natick, MA, USA). The ROI was selected by setting the cortical region, the boundary region between the cortex and medulla, and the medulla region. In the ultrasound image, the characteristics of the normal kidney are in the shape of an oval composed of the renal cortex, which shows low echo compared to the liver, and the renal sinus, which shows high echo. The boundary between the cortex and the renal sinus is clear, and a high echo in the center is visible. On the other hand, in the kidney that is continuously damaged, the ultrasonic echo of the renal cortex increases due to fibrosis. As a result, the boundary between the brightened renal cortex and the renal cortex is unclearly observed. In addition, due to the decline in function, the size decreases, and kidney atrophy is observed [14]. Because these features are used in the diagnosis of chronic kidney disease, the ROI area was set to 50 × 50 and set to 3 locations. The following figure shows the normal, moderate, and severe ultrasound images of 872 × 1280 resolution used in this study. Figure 1 shows normal, mild and moderate and severe CKD ultrasound images.

Experimental Method
The region of interest (ROI) was set in the ultrasound image of the kidney, and the result was calculated using MATLAB 2016a (MathWorks Inc., Natick, MA, USA). The ROI was selected by setting the cortical region, the boundary region between the cortex and medulla, and the medulla region. In the ultrasound image, the characteristics of the normal kidney are in the shape of an oval composed of the renal cortex, which shows low echo compared to the liver, and the renal sinus, which shows high echo. The boundary between the cortex and the renal sinus is clear, and a high echo in the center is visible. On the other hand, in the kidney that is continuously damaged, the ultrasonic echo of the renal cortex increases due to fibrosis. As a result, the boundary between the brightened renal cortex and the renal cortex is unclearly observed. In addition, due to the decline in function, the size decreases, and kidney atrophy is observed [14]. Because these features are used in the diagnosis of chronic kidney disease, the ROI area was set to 50 × 50 and set to 3 locations. The following figure shows the normal, moderate, and severe ultrasound images of 872 × 1280 resolution used in this study. Figure 1 shows normal, mild and moderate and severe CKD ultrasound images.  Figure 2 shows the overall block diagram of this experiment. Histogram equalization and range filter preprocessing were performed on the original ultrasound image. Histogram equalization can improve the quality of an image by making the distribution of light and dark in the image uniform [15]. The range filter can cause the noise reduction effect by highlighting the boundary of the image [16]. After preprocessing was performed, feature parameters were extracted by applying the GLCM algorithm. A total of 19 parameters were extracted from each of the three regions of the  Figure 2 shows the overall block diagram of this experiment. Histogram equalization and range filter preprocessing were performed on the original ultrasound image. Histogram equalization can improve the quality of an image by making the distribution of light and dark in the image uniform [15]. The range filter can cause the noise reduction effect by highlighting the boundary of the image [16]. After preprocessing was performed, feature parameters were extracted by applying the GLCM algorithm. A total of 19 parameters were extracted from each of the three regions of the cortex, the boundary between the cortex and medulla, and the medulla, and, finally, the size information was combined to determine a total of 58 input parameters. An artificial neural network with 10 hidden layers was constructed, and the output was designed to be classified into three types: normal, mild and moderate CKD, and severe CKD.
Diagnostics 2021, 11, x FOR PEER REVIEW 4 of 13 cortex, the boundary between the cortex and medulla, and the medulla, and, finally, the size information was combined to determine a total of 58 input parameters. An artificial neural network with 10 hidden layers was constructed, and the output was designed to be classified into three types: normal, mild and moderate CKD, and severe CKD.

Gray-Level Co-Occurrence Matrix (GLCM)
The GLCM [17], a texture descriptor, is used to compute the second-order statistical features from normal and CKD images. Considering an image I with a size of M × N and Ng number of distinct gray levels, the variations of texture are calculated by using the gray tone spatial dependence matrix p (i, j), where the pixels are separated with a distance d at the i-th and j-th gray levels. In this present work, four angles (0°, 45°, 90°, and 135°) with a pixel distance of 1 were considered. The second-order statistical features (autocorrelation, contrast, correlation, cluster prominence, cluster shade, dissimilarity, energy, entropy, homogeneity, maximum probability, sum of squares variance, sum average, sum variance, sum entropy, difference variance, difference entropy, information measure of correlation 1, information measure of correlation 2, and inverse difference (INV)) were calculated using the GLCM. Figure 3a shows the result implemented using MATLAB to obtain GLCM parameters. If you select the ROI area and run, it is saved as an Excel file, as shown in Figure 3b.   Table 3 shows the parameters that can be extracted when calculating the GLCM using an ROI image. Table 1 shows the variables and notation used to compute texture features that are the parameters of the GLCM.
We used the equations in Table 3 that are based on second-order statistical values, obtaining 19 values for each image, corresponding to 19 different texture descriptors.

Gray-Level Co-Occurrence Matrix (GLCM)
The GLCM [17], a texture descriptor, is used to compute the second-order statistical features from normal and CKD images. Considering an image I with a size of M × N and Ng number of distinct gray levels, the variations of texture are calculated by using the gray tone spatial dependence matrix p (i, j), where the pixels are separated with a distance d at the i-th and j-th gray levels. In this present work, four angles (0 • , 45 • , 90 • , and 135 • ) with a pixel distance of 1 were considered. The second-order statistical features (autocorrelation, contrast, correlation, cluster prominence, cluster shade, dissimilarity, energy, entropy, homogeneity, maximum probability, sum of squares variance, sum average, sum variance, sum entropy, difference variance, difference entropy, information measure of correlation 1, information measure of correlation 2, and inverse difference (INV)) were calculated using the GLCM. Figure 3a shows the result implemented using MATLAB to obtain GLCM parameters. If you select the ROI area and run, it is saved as an Excel file, as shown in Figure 3b. cortex, the boundary between the cortex and medulla, and the medulla, and, finally, the size information was combined to determine a total of 58 input parameters. An artificial neural network with 10 hidden layers was constructed, and the output was designed to be classified into three types: normal, mild and moderate CKD, and severe CKD.

Gray-Level Co-Occurrence Matrix (GLCM)
The GLCM [17], a texture descriptor, is used to compute the second-order statistical features from normal and CKD images. Considering an image I with a size of M × N and Ng number of distinct gray levels, the variations of texture are calculated by using the gray tone spatial dependence matrix p (i, j), where the pixels are separated with a distance d at the i-th and j-th gray levels. In this present work, four angles (0°, 45°, 90°, and 135°) with a pixel distance of 1 were considered. The second-order statistical features (autocorrelation, contrast, correlation, cluster prominence, cluster shade, dissimilarity, energy, entropy, homogeneity, maximum probability, sum of squares variance, sum average, sum variance, sum entropy, difference variance, difference entropy, information measure of correlation 1, information measure of correlation 2, and inverse difference (INV)) were calculated using the GLCM. Figure 3a shows the result implemented using MATLAB to obtain GLCM parameters. If you select the ROI area and run, it is saved as an Excel file, as shown in Figure 3b.   Table 3 shows the parameters that can be extracted when calculating the GLCM using an ROI image. Table 1 shows the variables and notation used to compute texture features that are the parameters of the GLCM.
We used the equations in Table 3 that are based on second-order statistical values, obtaining 19 values for each image, corresponding to 19 different texture descriptors.  Table 3 shows the parameters that can be extracted when calculating the GLCM using an ROI image. Table 1 shows the variables and notation used to compute texture features that are the parameters of the GLCM.
We used the equations in Table 3 that are based on second-order statistical values, obtaining 19 values for each image, corresponding to 19 different texture descriptors. These calculations were performed using the operations indicated in Table 1 for each position p (i, j) of the GLCM and adding all of the values from the GLCM. Prior to obtaining these features, a few simple calculations are needed. µ i , µ j and σ i , σ j correspond to the mean and standard deviation, respectively, of i and j. p x (i) is the marginal probability of i in p x , and p y (j) is the marginal probability of j in p y . HX is the entropy of p x , and HY is the entropy of p y . These values were calculated using Table 2 [18]. Table 2. Variables and notations used to compute the texture features.
Notation Definition

Artificial Neural Network (ANN)
The ANN is an element of machine learning that has currently become significant in research and development. The concept of machine learning is the ability of a computer to understand the structure of data using a mathematical or statistical model. The foundation of an ANN is made up of a single layer of input, process, and output elements. As a result, from a very basic concept of an information processing cycle, ANN then performs a complex mathematical formulation in order to produce an optimum result for any dataset or problem segment [19]. Figure 4 shows the block diagram of the neural network used in this experiment. ROI was selected from 3 locations for feature detection in the original image.
ROI was selected from the cortex, the boundary between the cortex and medulla, and the medulla. The size of the kidney, which is a very important factor in the diagnosis of chronic kidney disease, was selected as a feature parameter. As a result of the GLCM calculation, 19 parameters were extracted from each of the cortex regions; that is, the boundary between the cortex and medulla and the medulla (Table 3). In addition, by adding the size of the kidney as a parameter, the input layer consisted of a total of 58 nodes. After passing through 10 hidden layers, the output layer was classified into three types: normal, mild and moderate CKD, and severe CKD.

Results
The implementation of image preprocessing, the GLCM algorithm, and the artificial neural network was carried out using MATLAB R2016a. This tool provides a user-friendly interface and has many inbuilt functions, so it is easy to implement algorithms in it. Windows 10 (64 bit) with a 3.60 GHz Intel i9 processor and 64 GB of RAM was used for this study. Figure 5 shows the result of setting three ROIs in the original image.  Figure 6 shows the results of applying histogram equalization to the ROI area during the pretreatment process.  After the preprocessing of US images, texture statistical features were extracted using the GLCM algorithm. Means of features were obtained using the GLCM relative to four different orientations that were calculated. Tables 4-7 display the GLCM results of the ROI was selected from the cortex, the boundary between the cortex and medulla, and the medulla. The size of the kidney, which is a very important factor in the diagnosis of chronic kidney disease, was selected as a feature parameter. As a result of the GLCM calculation, 19 parameters were extracted from each of the cortex regions; that is, the boundary between the cortex and medulla and the medulla (Table 3). In addition, by adding the size of the kidney as a parameter, the input layer consisted of a total of 58 nodes. After passing through 10 hidden layers, the output layer was classified into three types: normal, mild and moderate CKD, and severe CKD.

Parameter Formula
Autocorrelation

Results
The implementation of image preprocessing, the GLCM algorithm, and the artificial neural network was carried out using MATLAB R2016a. This tool provides a user-friendly interface and has many inbuilt functions, so it is easy to implement algorithms in it. Windows 10 (64 bit) with a 3.60 GHz Intel i9 processor and 64 GB of RAM was used for this study. Figure 5 shows the result of setting three ROIs in the original image.

Results
The implementation of image preprocessing, the GLCM algorithm, and the artificial neural network was carried out using MATLAB R2016a. This tool provides a user-friendly interface and has many inbuilt functions, so it is easy to implement algorithms in it. Windows 10 (64 bit) with a 3.60 GHz Intel i9 processor and 64 GB of RAM was used for this study. Figure 5 shows the result of setting three ROIs in the original image.   After the preprocessing of US images, texture statistical features were extracted using the GLCM algorithm. Means of features were obtained using the GLCM relative to four different orientations that were calculated. Tables 4-7 display the GLCM results of the  The implementation of image preprocessing, the GLCM algorithm, and the artificial neural network was carried out using MATLAB R2016a. This tool provides a user-friendly interface and has many inbuilt functions, so it is easy to implement algorithms in it. Windows 10 (64 bit) with a 3.60 GHz Intel i9 processor and 64 GB of RAM was used for this study. Figure 5 shows the result of setting three ROIs in the original image.   After the preprocessing of US images, texture statistical features were extracted using the GLCM algorithm. Means of features were obtained using the GLCM relative to four different orientations that were calculated. Tables 4-7 display the GLCM results of the After the preprocessing of US images, texture statistical features were extracted using the GLCM algorithm. Means of features were obtained using the GLCM relative to four different orientations that were calculated. Tables 4-7 display the GLCM results of the cortex, the boundary between the cortex and medulla, and the medulla, respectively. Table 7 shows the size of the kidney that is normal and that with mild and moderate CKD and severe CKD.  1.00 ± 0.0008 1.00 ± 0.0008 1.00 ± 0.0008 1.00 ± 0.0007 1.00 ± 0.0006 1.00 ± 0.0007 Table 7. The size of the normal kidney and that with mild and moderate CKD and severe CKD (mean ± STD).

Variable Normal Mild & Mod. CKD Severe CKD
Size 11.7 ± 0.46 9.14 ± 2.00 7.07 ± 1.70 Figure 7 shows the result of the ANN consisting of 64 inputs, 10 hidden layers, and 3 outputs. In the Figure 7a, the training result was 95.6%, the validation result was 97.3%, and the test result was 85.7%. The implemented modeling has an error of 0.030511 as shown in Figure 7b. Using this ANN model, the final classification rate was 95.4%. Figure 8 shows the ROC curve for the results.

Discussion
Worldwide, the number of patients with chronic kidney disease is increasing at a tremendous rate. Chronic kidney disease is particularly commonly observed in conjunction with diabetes, high blood pressure, and old age, but Korea has recently become an aging society, and the number of patients with high blood pressure and diabetes has increased due to the Westernized lifestyle; additionally, about 10% of the adult population suffers from chronic kidney disease and is 60 years old or older. The incidence of chronic kidney disease is increasing rapidly. This phenomenon means that the number of patients who need dialysis or a kidney transplant due to chronic kidney disease is also increased, and when the number of patients with end-stage renal failure increases, a huge loss is inevitable in terms of both the social and national contexts as well as in individual patients and families [2].
Looking at the studies for diagnosing chronic kidney disease, the 2017 Igbinedion [20] study and the 2020 Prashanth [21] study determined the CKD stage using creatinine levels and eGFR, which are common diagnostic criteria in clinical practice. In 2013, Dijana et al. [8] diagnosed kidney disease by measuring kidney size according to kidney function and anthropometric characteristics. There was a significant correlation between all measured kidney dimensions, volume, parenchymal thickness, and serum creatinine. In 2020, Priyanke et al. [22] conducted a study to extract feature parameters from the kidney by applying the GLCM and PCA to ultrasound images. This study focuses on the preprocessing process and how feature parameters can be extracted from the kidney. In 2019, Kuo et al. [23] used the transfer learning technique, integrating the powerful ResNet

Discussion
Worldwide, the number of patients with chronic kidney disease is increasing at a tremendous rate. Chronic kidney disease is particularly commonly observed in conjunction with diabetes, high blood pressure, and old age, but Korea has recently become an aging society, and the number of patients with high blood pressure and diabetes has increased due to the Westernized lifestyle; additionally, about 10% of the adult population suffers from chronic kidney disease and is 60 years old or older. The incidence of chronic kidney disease is increasing rapidly. This phenomenon means that the number of patients who need dialysis or a kidney transplant due to chronic kidney disease is also increased, and when the number of patients with end-stage renal failure increases, a huge loss is inevitable in terms of both the social and national contexts as well as in individual patients and families [2].
Looking at the studies for diagnosing chronic kidney disease, the 2017 Igbinedion [20] study and the 2020 Prashanth [21] study determined the CKD stage using creatinine levels and eGFR, which are common diagnostic criteria in clinical practice. In 2013, Dijana et al. [8] diagnosed kidney disease by measuring kidney size according to kidney function and anthropometric characteristics. There was a significant correlation between all measured kidney dimensions, volume, parenchymal thickness, and serum creatinine. In 2020, Priyanke et al. [22] conducted a study to extract feature parameters from the kidney by applying the GLCM and PCA to ultrasound images. This study focuses on the preprocessing process and how feature parameters can be extracted from the kidney. In 2019, Kuo et al. [23] used the transfer learning technique, integrating the powerful ResNet

Discussion
Worldwide, the number of patients with chronic kidney disease is increasing at a tremendous rate. Chronic kidney disease is particularly commonly observed in conjunction with diabetes, high blood pressure, and old age, but Korea has recently become an aging society, and the number of patients with high blood pressure and diabetes has increased due to the Westernized lifestyle; additionally, about 10% of the adult population suffers from chronic kidney disease and is 60 years old or older. The incidence of chronic kidney disease is increasing rapidly. This phenomenon means that the number of patients who need dialysis or a kidney transplant due to chronic kidney disease is also increased, and when the number of patients with end-stage renal failure increases, a huge loss is inevitable in terms of both the social and national contexts as well as in individual patients and families [2].
Looking at the studies for diagnosing chronic kidney disease, the 2017 Igbinedion [20] study and the 2020 Prashanth [21] study determined the CKD stage using creatinine levels and eGFR, which are common diagnostic criteria in clinical practice. In 2013, Dijana et al. [8] diagnosed kidney disease by measuring kidney size according to kidney function and anthropometric characteristics. There was a significant correlation between all measured kidney dimensions, volume, parenchymal thickness, and serum creatinine. In 2020, Priyanke et al. [22] conducted a study to extract feature parameters from the kidney by applying the GLCM and PCA to ultrasound images. This study focuses on the preprocessing process and how feature parameters can be extracted from the kidney. In 2019, Kuo et al. [23] used the transfer learning technique, integrating the powerful ResNet model pretrained on an ImageNet dataset in neural network architecture, to predict kidney function based on 4505 kidney ultrasound images labeled using eGFRs derived from serum creatinine concentrations. Since the mid-late 2000s, many studies have started to apply machine learning and deep learning to medical images for diagnosis.
In this study, the cortex of the kidney, the boundary between the cortex and medulla, and the medulla were set as ROIs for diagnosing chronic kidney disease on ultrasound images. Parameters were extracted from each ROI region using the GLCM algorithm, which is widely used in ultrasound image analysis. The parameters are autocorrelation, contrast, correlation, cluster prominence, cluster shade, dissimilarity, energy, entropy, homogeneity, maximum probability, sum of squares variance, sum average, sum variance, sum entropy, difference variance, difference entropy, information measure of correlation 1, information measure of correlation 2, and inverse difference (INV). When each parameter was extracted from three areas, a total of 57 GLCM parameters were extracted. Finally, a total of 58 parameters were used by adding information on the size of the kidney, which is important for the diagnosis of chronic kidney disease. A total of 58 input parameters were tested by constructing an ANN, which is a machine learning method. Input parameters were set to 58, and the hidden layer was set to 10. Because 10 or more hidden layers showed no effect on the classification rate, the experiment was conducted with 10 hidden layers. The three outputs to be classified were normal, mild and moderate CKD, and severe CKD. It is thought that the classification rate of the result to be classified was increased by using all 58 input parameters. The classification accuracy was 95.4%, the epoch needed for training was 38 times, and the misclassification rate was 4.6%. In this experiment, three types of conditions were classified, namely, normal, mild and moderate CKD, and severe CKD, but a further detailed classification of disease states is required. In addition, the experiment was conducted by acquiring 741 data items, which is due to the fact that the amount of data is not large; thus, the machine learning method was selected. When a large amount of data is acquired, we plan to apply the deep learning method after acquiring more data. In order to actually use it clinically, it is necessary to diversify the types of classification. After making the implemented result available to the ultrasonic equipment, it needs to be upgraded through feedback from the sonographer.

Conclusions
Chronic kidney disease can be treated if it is detected early, but as the disease progresses, recovery becomes impossible. Eventually, renal replacement therapy such as transplantation or dialysis must be used. In other words, it is crucial to detect and treat chronic kidney disease in the early stages. Ultrasound is a test method for diagnosing kidney cancer, inflammatory disease, nodular disease, chronic kidney disease, etc., and is used to check information on the degree of inflammation using information such as kidney size and internal echo characteristics.
In this study, ultrasound images, including 251 normal kidney images, 328 mild and moderate kidney disease images, and 162 severe renal kidney images, were used in 741 cases. In order to diagnose chronic kidney disease in clinical practice, three ROIs were set, namely, the cortex of the kidney, the boundary between the cortex and medulla, and the medulla, which are areas examined to obtain information from ultrasound images. Parameters were extracted from each ROI using the GLCM algorithm, which is widely used in ultrasound image analysis. When each parameter was extracted from the three areas, a total of 57 GLCM parameters were extracted. Finally, a total of 58 parameters were used by adding information on the size of the kidney, which is important for the diagnosis of chronic kidney disease. The ANN was composed of 58 input parameters, 10 hidden layers, and 3 output layers (normal, mild and moderate CKD, and severe CKD). Using the ANN model, the final classification rate was 95.4%, the epoch needed for training was 38 times, and the misclassification rate was 4.6%. It is believed that this experiment can be used as a basis for implementing an automatic diagnosis system in the area of diagnosing chronic kidney disease using ultrasound images. In addition, the use of experimental results is thought to play an important role in clinical decision making, including early diagnosis and treatment of chronic kidney disease.