1Department of Computer Science, College of Basic Education, University of Sulaimani, Kurdistan region, Iraq, 2,3Department of Information Technology, College of Science and Technology, University of Human Development, Kurdistan Region, Iraq
ABSTRACT
Nephrolithiasis is a scientific term that refers to kidney stones and means the formation of crystal concretions in the kidney. It is considered a widespread situation that affects millions of people worldwide. Those stones can cause serious discomfort to infected people, especially when they traverse the urinary system, although, the big stones may need a surgical intervention. Various systems are already in use to address kidney stones, including ultrasound imaging for detection, extracorporeal shock wave lithotripsy (ESWL) for non-invasive stone fragmentation, and ureteroscopy for surgical removal, showcasing the advances in medical technology for managing this condition. This study presents an approach for detecting stones in the affected kidney. Apublic dataset has been employed in this work, containing (2370) images of healthy and affected kidneys. The dataset was utilized to train the proposed approach for the aim of stone detection. To achieve high detection accuracy, we implemented two key phases before classification. The preprocessing phase enhances image quality by reducing noise using a median filter and improving contrast through contrast stretching and tone enhancement. The segmentation phase follows, accurately identifying the kidney’s edges and regions of interest for effective feature extraction. The Local Binary Pattern (LBP) technique, combined with the support vector machine (SVM) algorithm serves as the primary components of the proposed model. The feature extraction comes into action through the LBP technique as a preparation step for the SVM classifier to complete the stone detection process. The approach introduced in this paper has the potential to enhance detection accuracy and efficiency. Furthermore, it could be used as an early detection tool to identify potential cases, thereby helping to prevent complications and adverse outcomes. This method aims to improve on the traditional manual process employed by radiologists, which could be described as time and effort consumption rather than the exposure of the interpretations. The obtained results were compared with the most relevant approaches in the field of kidney stone detection, demonstrating the model’s effectiveness in achieving the desired goal with a diagnostic accuracy of 96.37% for kidney stones.
Index Terms: Medical Image Analysis, CT Images, Local Binary Pattern, Support Vector Machine, Kidney Stones
Image processing techniques have been proven as powerful tools in the field of medical image analysis due to their efficiency in improving the quality of those images along with the ability to extract useful information from them. Furthermore, they have been combined with machine-learning techniques; and together they achieve a quite noticeable progress in different domains, precisely in healthcare applications. Since kidney stones are considered a serious threat to people’s health, many developments and research applied in this field to reduce that threat to the minimum, and over time early detection becomes a necessity for the diagnosis. The researchers invested a lot of their time and thoughts for that matter through many approaches that were based on image processing, machine learning, or both, including the segmentation and feature extraction techniques [1], [2].
More advancements have been established by merging a variety of those techniques to support early diagnosis accurately. One of the powerful algorithms that achieve such improvement is the Support Vector Machine (SVM) through CT images. SVMs are valued for their ability to create clear decision boundaries, making them effective for binary and multiclass classification tasks. Its capability of classifying the kidney stones correctly was obvious and greatly participated in patient care [3], [4].
The spread of the problem of kidney stones has become the focus of attention of many researchers. The worldwide research community has recognized the urgent need for accurate and effective techniques for the rapid detection of kidney stones to reduce the potential for complications and patient uneasiness.
To overcome the penalties of the usual diagnosis procedure through the established methods by the radiologists which take a quit amount of time and effort with the potential of interpretations and complications that could lead to a negative affection on the patient, the suggested model can offer a precise improvement in early kidney stones detection and prevent any expected inconvenience.
The early detection and the accurate diagnosis of kidney stones are the main objectives of this work. Asuggested approach presented in this study for that purpose utilizes a Support Vector Machine (SVM) algorithm with the Local Binary Pattern (LBP) technique for the premature and precise detection of kidney stones avoiding unnecessary consequences and providing proper medical care. The model was implemented using MATLAB (R2021a) starting from fetching the input images through a series of preprocessing for the image’s quality enhancement and crossing the segmentation phase for Region of Interest (ROI) determination. Fifty-nine features extracted by LBP to be fed into SVM for classification. The upcoming sections present a literature review to provide background and context, the proposed method detailing our approach, implementation, and results to demonstrate our findings, and a conclusion summarizing key insights and future directions.
Introduced in this section is a diversity of remarkable approaches and contributions including the specifics of the proposed models in their works with the extracted phases that contributed to the enhancement of the stone’s recognition accuracy.
The frequent appearance of stone issues in patient’s kidneys motivated the authors in [5] to employ Computer-Aided Detection (CAD) algorithms for stone detection using CT images. Their approach highlighted the problem of organ determination, directing attention to the importance of segmenting the image and emphasizing the region of interest (ROI) and how this addition will have an effect on the stone detection accuracy. Ultrasound images are employed by [6] for stone detection, for that they added a preprocessing phase to the used images along with a Median filter for image quality enhancement and noise removal, the image was then segmented using a morphological segmentation, the confusion matrix gathered by the Gray Level Co-occurrence Matrix (GLCM) used then for model assessment with a rate of 90%. The authors in [7] also utilized ultrasound images, incorporating a preprocessing phase into their model. In addition to applying morphological procedures, they enhanced the approach by integrating fuzzy masking. Then entropy-based segmentation is used to define the (ROI). For final classification, the SVM and KNN algorithms were used, and the classification accuracy results were 89% and 84% for the KNN and SVM classifiers, respectively.
The author in [8] distinguished between healthy tissues and those surrounding abscesses, fibrosis, and stones using a watershed segmentation technique, and as a tissue index LBP was used. To describe the shape and wrongdoing of kidney conditions, such as the compositional spectrum was used as statistical features, in addition to the geometric features. The accuracy of the system was evaluated as follows: 88.4% for LBP and 91.36% for the synthetic spectrum, while the combination of the local binary spectrum and the synthetic spectrum achieved 95%.
To enhance diagnosis and treatment, a study conducted in[9], [10] focused on improving the identification of kidney stone types. The authors carried out a pilot study to explore the classification of kidney stones using in vivo images obtained during ureteroscopy procedures. These images were analyzed, and visual features used by urologists to differentiate stone types were encoded into vectors for kidney stone surface and cross-section. The feature vectors combined the color features and the texture features where LBP was employed for extraction. The classification was performed in [9] using Random Forest and ensemble K Nearest Neighbor classifiers, achieving 89% overall accuracy. At the same time, in [10] They compared the performance of six shallow machine-learning methods and three deep-learning architectures, SVM was used as one of the methods with precision results of 79% for the mixed kidney stone patches (surface and section).
In addition, CT images of a kidney with a stone were examined by [11] through a model consisting of neural network-based and SVM-based classification, while preprocessing techniques were employed for noise removal and GLCM for feature extraction, for the ANN-based model achieved 85%, while using SVM gave an accuracy of 95% with fewer features and 99% with full features.
The combination between neural network and SVM continued in [12] where the authors proposed a model named a “Hybrid Deep VGN-19 and Binary SVM (HDVS),” deep learning techniques were employed for extracting the features whereas the SVM served as a classifier, a metric of precision, F1 score, recall and accuracy used for the system evaluation which achieved a rate of 99.89% for accuracy.
A renal calculi identification explored by [13] by presenting an SVM-based model through a small number of only 250 ultrasound images, median filter employed to reduce the image’s noise, K-means clustering and GLCM were used for segmentation and extracting features, respectively, the model attained an accuracy of 98.8%.
Another neural-svm combination proposed by [14] where X-Ray images were examined using multiple machine learning methods such as Random Forest, K-Nearest Neighbor, Decision Trees, Multilayer Perceptron, CNN, and Naive Bayes (BernoulliNB) besides SVM, the approach assessed through F1 score, precision, and recall. The outcomes of SVM were 92.4%, 85.8%, and 85.8%, respectively.
In another study, an approach presented by [15] for kidney disease identification, the approach used SVM and ANN as classifiers to compare the performance of the two algorithms based on the accuracy and time consumption, the resultant outcomes revealed that ANN was more accurate in detection with 87.70% accuracy than SVM which achieved 76.32%. By leveraging preprocessing followed by a combination of LBP for feature extraction and SVM for classification, our approach demonstrates better accuracy and efficiency, particularly in handling noisy images, as reflected in the results. This advantage addresses the limitations of the compared methods, which often lack feature representation and adaptability, leading to lower accuracy.
The proposed method in this study leverages supervised learning techniques for accuracy enhancement regarding kidney stone detection in CT scan images, a critical aspect of urolithiasis diagnosis.
The proposed architecture of the model in this work as presented in Fig. 1 has been established through four primary stages. As mentioned in [16], the whole possible implementable recognition process consists of four consecutive phases, namely: Pre-processing (P), Segmentation (S), Feature Extraction (F), and Classification (C). The kidney stone detection process in this work is depicted as (PSFC) indicating the employment of the phases.
Fig. 1. The proposed model architecture.
The implementation was carried out using MATLAB (R2021a), the process starts with image preprocessing to enhance the contrast and remove noise, followed by segmentation to detect the objects and their boundaries in the images. Then, feature extraction is applied using the LBP technique. The extracted features were used afterward for SVM training, which was used to predict the presence of kidney stones in new CT images. This section provides a step-by-step illustration and a visual diagram for replicating the implementation.
This study utilized a public dataset [17] of CT images, with 5077 images of normal kidneys and 1,377 of kidneys with stones. The data set contains other images related to kidney diseases that are not included in this study, so they are discarded for discussion. The total number of images used in this work is 6454 from the dataset. The images are in JPG format and have a dimension of 512 × 512 pixels.
As mentioned, the number of images in these two classes is not equal. To address the challenge of this imbalanced dataset in SVM, there are several techniques, such as resampling and class weights techniques. Resampling techniques include oversampling and undersampling. Oversampling involves generating additional samples (images) of the minority class to rebalance the dataset while undersampling reduces the number of samples (images) in the majority class. These techniques aim to create a more equitable distribution of classes for SVM training. However, while resampling can be effective, it may lead to information loss or overfitting. The class weight technique assigns varying levels of significance to each class during SVM training, with greater weights assigned to the minority class and lesser weights to the majority class, this means that the SVM prioritizes the correct classification of the minority class (the stone class) without altering the dataset’s composition.
In this study, the class weight technique has been adopted for its distinct advantages over resampling methods, including:
Efficiency: Class weights are computationally more efficient compared to resampling techniques. Resampling involves creating duplicate samples, which can significantly increase the dataset size, leading to longer training times. In contrast, class weights only affect the loss function during training without changing the dataset size.
Preservation of Data: Resampling methods such as oversampling and undersampling can result in loss of information or potential overfitting, as they duplicate or remove data points. Class weights do not alter the data distribution, ensuring that all original data points are considered during training.
No Need for Data Generation: Resampling may require generating synthetic data points or discarding data, which can introduce bias or inaccuracies. Class weights do not require creating synthetic data, reducing the risk of introducing artifacts.
For a more comprehensive view of the dataset distribution, Table 1 provides a detailed breakdown of the dataset distribution, including the total number of images in each class, as well as their division into training and testing subsets. In addition, the dataset was partitioned into two distinct subsets: The training set, encompassing 80% of the images, and the test set, encompassing the remaining 20%. These images served as input for various computer vision techniques to extract relevant information and features.
TABLE 1: Dataset usage of CT kidney images
Numerous studies have substantiated that the model’s accuracy rate is inherently dependent on the output quality of the preprocessing phase. This study seeks to further corroborate this notion by introducing a preprocessing phase comprising three stages. These stages are deployed to enhance the quality of the input image, consequently leading to an improvement in the accuracy of kidney stone identification. The pre-processing steps are delineated as follows:
In this study, the median filter was applied during preprocessing to reduce noise in the CT images while preserving critical edge details. This step ensured that the kidney’s boundaries and texture features were retained, improving the accuracy of subsequent segmentation and feature extraction phases.
Contrast enhancement was utilized to improve the visibility of kidney structures and potential stones in the CT images. This process involved two steps: Contrast stretching to distribute brightness uniformly across the dynamic range, followed by tone adjustment to highlight key areas such as shadows, mid-tones, and highlights. These enhancements made critical features more distinguishable, aiding in accurate edge detection, and feature extraction.
Segmentation is frequently used to distinguish between objects and boundaries in images, it is considered an essential component in medical image analysis, it makes medical data representation easier to understand and facilitates the diagnosis of a variety of disorders.
To identify kidney stones and clarify their boundaries, Canny edge detection was used in this study. One of the characteristics of this technology is that it can separate important visual parts from those surrounding them architecturally and in a largely unified manner. Thus, it helps in reducing the amount of data that must be processed. This enables it to detect the edges of objects to be focused on, which enhances the success requirements for the system that uses its features.
The feature extraction process is considered one of the main phases in the used system. This phase focuses on transforming segmented kidney images into numerical representations, extracting useful information from the region of study, and building it out into statistics in a more comprehensible formation. This study employed the technique of LBP for the feature extraction phase. The technique was first presented in 1996 [18], and since it has been widely applied in texture analysis across various fields, image analysis was one of them, the technique analyzes the grayscale value of each pixel in the image’s region of interest, comparing it to neighboring pixel values within a defined radius. It generates a binary pattern for each pixel based on these comparisons, which is then converted into a decimal value that describes the local texture.
In this study, LBP was applied to segmented CT images obtained after pre-processing and edge detection to capture textural variations in the kidney regions indicative of stones, the technique has a valuable achievement and approved its worth in local texture analysis.
A total of 59 features were extracted from each segmented image, balancing sufficient detail with computational efficiency. These features captured local texture differences crucial for distinguishing between normal kidneys and those with stones and were subsequently used by the SVM for classification.
This systematic feature extraction ensures that the most relevant information for kidney stone detection is captured, enabling accurate and reliable classification results.
In the supervised machine learning field of study, the support vector machine (SVM) algorithm shines as an effective classifier. Its mechanism is based on separating data points into classes in a hyperplane through a high-dimensional feature space. The basic working mechanism was presented by Vapnik in 1998 [19], and he is considered to have laid the foundation for the general theory of statistical learning. Since then, the theory has witnessed many expansions and developments while maintaining the basic goal, which is to determine the excess level to increase the margin between different classes. In this work, SVM was employed to identify kidney stones from CT images. The algorithm was trained on a public dataset of labeled CT images using MATLAB’s built-in functions and toolboxes for image processing and machine learning.
Experiments have been carried out to evaluate the performance and applicability of the proposed model implemented using MATLAB. The proposed model was performed on two sets of images from a public dataset of kidney’s CT images, normal kidney set and kidney with stone set.
A comprehensive workflow diagram, as depicted in Fig. 2, outlines the implementation of our proposed method. This workflow provides a visual representation of the entire process, allowing a clear understanding of the methodology.
Fig. 2. Overview of the proposed model with applied phases and techniques.
The images underwent a sequence of pre-processing procedures aimed at enhancing the input image’s quality, ultimately resulting in heightened accuracy for kidney stone identification. These pre-processing steps encompassed the conversion of the images to grayscale, preserving a spectrum of gray shades. Subsequently, a median filter was applied to reduce noise, and contrast enhancements were employed to enhance the visibility of objects within the image. Fig. 3 illustrates the results of this phase, particularly for a kidney with a stone.
Fig. 3. (a-c) The outcomes of the pre-processing phase.
Following the pre-processing stage, the segmentation phase was executed to identify objects and boundaries within the images. The outcome of this segmentation process is depicted in Fig. 4.
Fig. 4. Segmented image.
After applying Canny edge detection to segment a kidney CT image, the resulting image clearly defines and outlines the kidney structure. This high-contrast image significantly aids in the accurate identification of kidney stones.
After segmentation, comes the next necessary stage, which is feature extraction. The LBP technique was used for this purpose because it is an effective way to evaluate textures and patterns in images. When it comes to identifying kidney stones, it shows how important this technique is to identify important features and support the classification process. LBP focuses on storing local texture information to extract useful features from previously segmented kidney images that are necessary for the process of distinguishing between stone-affected kidneys and healthy kidneys. Choosing a feature extraction technique is an important stage when building the system because it has a direct impact on the success and accuracy of the classification process.
After extracting important features using the LBP technique, the kidney images are now transformed into a set of selective features that can be submitted to the classification stage, represented by the SVM technique, which has proven effective in the field of machine learning and is known for classifying data into separate groups according to the extracted feature vectors. The relevant features extracted by LBF are fed to the classification phase where SVM is applied as a classifier for training which yields images to be classified into “with stone” or “without stone” kidneys. The two technologies were used together to ensure a high level of accuracy, and this was proven, as the results indicated the detection of kidney stones with an accuracy of 96.37%, which is a new indicator that indicates the system’s potential and ability to differentiate between a healthy kidney and those with stones efficiently. The classification outcomes are visualized using a pie chart as shown in Fig. 5, this chart illustrates the classification results for each class based on the proposed approach.
Fig. 5. Classification results for each class based on the proposed model.
These results highlight the ability of the machine learning model to predict health outcomes and the SVM model to detect kidney stones. Further studies may focus on enhancing and utilizing these models in different contexts.
Furthermore, a comparative analysis was carried out to assess the accuracy performance of our approach concerning earlier research in this area. Table 2 provides a comprehensive comparison of the classification accuracy achieved by the proposed method alongside previous works. The accuracy values reflect the effectiveness of each approach in distinguishing between normal kidney images and those containing stones. The “Dataset” column in Table 2 categorizes the datasets based on their origin as presented by [16], distinguishing between publicly available datasets and those that are self-constructed, the datasets are classified whether they are publicly available or constructed by authors specifically for their approach. It is worth noting that some of the approaches listed in the table utilized the same public dataset that we employed in our method, as indicated by the corresponding references.
TABLE 2: Comparison of classification accuracy
Table 2 displays a comparison of classification accuracy among different approaches for kidney stone detection. It provides information about the dataset used (whether public or self-constructed), the feature extraction technique employed, the classifier used, and the accuracy achieved for stone detection in each approach.
All the approaches are in common with our proposal either with the used public dataset, the feature extraction technique, or the classifier. Among these, as shown in Fig. 6 the proposed method demonstrates the highest accuracy of 96.31% among all the listed approaches, signifying its effectiveness in accurately detecting kidney stones.
Fig. 6. Screenshot of the simulation reveals the result.
In this study, we aimed to tackle the critical challenge of kidney stone detection. Our proposed approach offers an efficient solution for the rapid and accurate identification of kidney stones, which can be a root cause of various health issues. Our investigation revealed the effectiveness of the SVM model in predicting the presence of stones, highlighting its potential to guide preventive and responsive healthcare strategies. In addition, we developed a machine learning model that harnesses the power of an SVM and utilizes LBP feature extraction to enhance accuracy by effectively extracting 59 features from segmented CT images to capture local texture details which are essential for classification. To achieve the desired result, the main process followed a systematic sequence: Pre-processing for noise reduction and contrast enhancement, segmentation to identify the kidney’s boundaries and ROI, feature extraction using LBP, and classification using SVM. The model was trained and validated using the publicly available CT KIDNEY DATASET: Normal-Cyst-Tumor and Stone ensuring replicability and standardization. This model was deployed for stone prediction, yielding an accuracy of 96.31%. In addition, the results were compared with related approaches, where this approach outperformed existing methods in terms of accuracy. The outcomes of this research hold substantial promise for public health, particularly in the realm of kidney stone detection.
[1] S. Singh, H. Singh, G. Bueno, O. Deniz, S. Singh, H. Monga and P. N. Hrisheekesha. “A review of image fusion:Methods, applications and performance metrics”. Digital Signal Processing, vol. 137, pp. 104020-104020, 2023.
[2] Y. M. Y. Abdallah and T. Alqahtani. “Research in medical imaging using image processing techniques”. In:Medical Imaging-Principles and Applications. BoD-Books on Demand, Norderstedt, 2019.
[3] M. Javaid, A. Haleem, R. P. Singh, R. Suman and S. Rab. “Significance of machine learning in healthcare:Features, pillars and applications”. International Journal of Intelligent Networks, vol. 3, pp. 58-73, 2022
[4] A. Soni and A. Rai. “Kidney Stone Recognition and Extraction Using Directional Emboss and SVM from Computed Tomography Images”. Institute of Electrical and Electronics Engineers, United States, 2020.
[5] V. Nazmdeh and S. S. Esmaili. “A review of methods for detection and segmentation of kidney stones from CT scan images using image processing method”. International Journal of Cybernetics and Cyber-Physical Systems, vol. 1, no. 2, 157, 2022.
[6] R. Goel and A. Jain. “Improved detection of kidney stone in ultrasound images using segmentation techniques”. In:Advances in Data and Information Sciences. Springer Nature, Germany, pp. 623-641, 2020.
[7] J. Verma, M. Nath, P. Tripathi and K. K. Saini. “Analysis and identification of kidney stone using Kth nearest neighbour (KNN) and support vector machine (SVM) classification techniques”. In:Pattern Recognition and Image Analysis. Vol. 27. Springer, Germany, pp. 574-580, 2017.
[8] A. H. Ali. “Studying the kidney textural using statistical features and local binary pattern”. Journal of Al-Nahrain University Science, vol. 20, no. 4, pp. 64-76
[9] A. Martinez, D. H. Trinh, J. El Beze, J. Hubert, P. Eschwege, V. Estrade, L. Aguilar, C. Daul and G. Ochoa. “Towards an Automated Classification Method for Ureteroscopic Kidney Stone Images using Ensemble Learning”. HAL (Le Centre pour la Communication Scientifique Directe), IEEE, United States, 2020.
[10] G. Ochoa-Ruiz. “On the in vivo Recognition of Kidney Stones Using Machine Learning”. Cornell University, United States, 2022.
[11] P. Chak, P. Navadiya, B. Parikh and K. C. Pathak. “Neural network and SVM based kidney stone based medical image classification”. In:Communications in Computer and Information Science. Springer, Germany, pp. 158-173, 2020.
[12] K. Somasundaram, S. M. Animekalai and P. Sivakumar. “An Efficient Detection of Kidney Stone Based on HDVS Deep Learning Approach”. ICCAP, Pennsylvania, 2021.
[13] S. Selvarani and P. Rajendran. “Detection of renal calculi in ultrasound image using meta-heuristic support vector machine”. Journal of Medical Systems, vol. 43, no. 9, 300, 2019.
[14] I. Aksakalli, S. Kaçdioğlu and Y. S. Hanay. “Kidney X-ray images classification using machine learning and deep learning methods”. Balkan Journal of Electrical and Computer Engineering, vol. 9, pp. 144-151, 2021.
[15] P. Sinha and P. Sinha. “Comparative study of chronic kidney disease prediction using KNN and SVM”. International Journal of Engineering Research, vol. V4, no. 12, 2015, 608.
[16] H. D. Majeed and G. S. Nariman. “Construction of alphabetic character recognition systems:A review”. UHD Journal of Science and Technology, vol. 7, no. 1, pp. 32-42, 2023.
[17] “CT Kidney Dataset:Normal-Cyst-Tumor and Stone”. Available from:https://www.kaggle.com/datasets/nazmul0087/ct-kidney-dataset-normal-cyst-tumor-and-stone [Last accessed on 2025 Jan 08].
[18] T. Ojala, M. Pietikäinen and D. Harwood. “A comparative study of texture measures with classification based on featured distributions”. Pattern Recognition, vol. 29, no. 1, pp. 51-59, 1996.
[19] V. N. Vapnik. “Statistical Learning Theory”. Wiley, Cop, NewYork, 1998.