
ISSN: 2643-6744
B Rahmani1*, S K Devarapalli1, A K Tadivaka1, Z Anwar2, P Norouzzadeh1, E Snir3, R Shoela1 and B Bastani1
Received: June 20, 2024; Published: June 26, 2024
*Corresponding author: Ayse Arslan, Department of Computer Science, Oxford Alumni of Northern California, Northern California
DOI: 10.32474/CTCSA.2024.03.000164
Kidney stone, also known as nephrolithiasis, is a prevalent medical condition that can cause excruciating abdominal/flank pain, nausea, vomiting, bloody urine, and at times obstructive uropathy, urinary tract infection, urosepsis, renal failure, or even death. In this paper, we detail our research on the development of Artificial Intelligence (AI) techniques to detect kidney stones in computerized tomography (CT) scans of the abdomen/pelvis. The contribution of this research is the rapid and accurate detection of kidney stones, their number and location in the urinary tract, and their changes over time. It allows physicians to implement timely therapeutic and preventive measures of stone formation and propagation.
Keywords: K Nearest Neighbor; Convolutional Neural Network
This Document is about kidney stone detection using Artificial Intelligence Methods. Kidney stones are formed by aggregates of crystals made of salts and minerals in the kidney and urinary tract. Stone formation is due to supersaturation of urine often due to low urine volume and lack of adequate water intake, or presence of excessive amounts of certain minerals or salts in the urine, such as, calcium, phosphate, oxalate, uric acid, or lack of inhibitors of crystallization, e.g., citrate, pyrophosphate, magnesium, Tamm- Horsfall protein, osteopontin, nephrocalcin, etc. Millions of people are affected and suffer from kidney stones around the world.
The prevalence of kidney stones has nearly doubled in the U.S. over the past three decades. According to the National Health and Nutrition Examination Survey (NHANES) cross-sectional data analysis, from 2007 to 2010, kidney stones affected 8.8% of the U.S population, while in 1994 NHANES report the prevalence rate was 5.2%. In the last 25 years, the male-to-female ratio has also been subjected to a dramatic change from 3:1 to less than 2:1. The prevalence of stone disease was highest among “non-Hispanic white” individuals (10.3%) while black non-Hispanic individuals were least affected (4.3%) [1]. This surge in prevalence rate was not limited to one specific demographic cohort. It was noted in all ages, genders, and racial/ethnic groups. Diet and lifestyle factors likely play an important role in changing the epidemiology of nephrolithiasis [2].
The best way to diagnose kidney stone(s) is non-contrast CT scan of abdomen and pelvis (stone protocol) [3]. In the case of large patient volumes, such as overcrowded emergency departments with many patients experiencing diverse abdominal complains, use of artificial intelligence (AI) could potentially save time and minimize human error in diagnosing kidney stone(s) and differentiating it from other causes of abdominal pain and associated symptoms. To overcome these problems, we are automating the procedure using artificial intelligence techniques for increased speed and efficiency. Artificial intelligence (AI) has shown promise, with possible advantages including speed, accuracy, and cost-effectiveness for prediction and diagnosis. In order to find patterns and forecast results, AI-based techniques may scan vast amounts of data from numerous sources, including medical pictures, patient records, and laboratory testing. Previous research has investigated the use of AI algorithms for detecting and diagnosing kidney stones in recent years, with encouraging findings.
A study by Daniel C Elton, et al. (2020) used a deep learning algorithm to detect residual stones with a gradient-based anisotropic denoising, thresholding, and region growing. The authors found that their model was 95% accurate which could help improve patient outcomes by reducing the need for additional procedures [4].
A study by Liu et al. (2021) used deep learning algorithms to predict the presence of kidney stones in patients based on CT scans. The authors found that their model was highly accurate with a 92.6% chance of correctly predicting the presence of kidney stones [5]. Other studies have focused on using AI for diagnosing and classifying different types of kidney stones.
Another study, by Zhang et al. (2021), used a support vector machine (SVM) algorithm to predict the composition of kidney stones based on spectral data obtained from laser-induced breakdown spectroscopy (LIBS). The authors found that their model had high accuracy and could predict the composition of stones with an error rate of less than 10% [6,7]. Dr. Geetha and his research group applied SVM for kidney detection too [8].
Another study by Li et al. (2019) used a machine learning algorithm to predict the likelihood of stone-free status after SWL treatment. The authors found that their model had high accuracy and could predict stone-free status with a sensitivity of 87.3% and specificity of 89.7% [9].
A study by Yang et al. (2021) used a convolutional neural network (CNN) to detect the presence of kidney stones in ultrasound images. The authors found that their model achieved high accuracy in detecting stones, with an area under the receiver operating characteristic curve (AUC) of 0.982 [10].
These studies demonstrate the potential of AI-based methods for improving the accuracy and efficiency of kidney stone detection and diagnosis, as well as predicting treatment outcomes and recurrence. However, further research is needed to address several challenges, such as the standardization of datasets and the ethical and legal implications of using AI in healthcare [11-16].
In this paper, after data description and preprocessing, k-Nearest Neighbor and Convolutional Neural Network will be described, and finally the kidney stone detector website and results will be presented.
In this paper, we used large datasets collected from Kaggle open source that contains 12,446 unique data images in jpg image format. The data include 3,709 with cyst, 5,077 healthy images, 1,377 with stones, and 2,283 images with tumors. Tumors (solid masses) can be benign (not cancerous) or malignant (cancerous). One in four kidney tumors are benign. Smaller tumors are more likely to be benign. A solid masse in the kidney that enhances after infusion of intravenous contrast is considered malignant, till proven otherwise. Simple cysts in the kidney are benign. Chronic kidney diseases and old age can result in acquired kidney cysts. Representative CT scan images of kidney tumor, kidney cyst, and kidney stone are shown in Figure 1.
Extracting counters from the images can be used to extract features such as size, shape, and location of the kidney stone. Then the extracted features can be used to identify the patterns, which can be used in the diagnosis of kidney stones.
Figure 2 includes several data argumentation techniques such as rotating the images by 20 degrees, zooming by 0.2, applying a shearing angle of 0.2, and adjusting the brightness. Horizontal flip was thn applied to the images. Finally, the data was normalized. By applying data argumentation techniques, new images are generated from the original images, which increase the quantity and diversity of the dataset. This can improve the model’s performance and provide better generalization to new images.
The kNN model can be used for both classification and regression. We used different k values and obtained the training accuracies. Improved accuracies were obtained at k=3.When we applied Grid Search algorithm the accuracy obtained at k=3 is 0.56, Figure 3.
The architecture of the model consists of several layers – The first Conv2D layer has 32 filters, a kernel size of 3, and ReLU activation function, applied to the input images. MaxPooling2D layer with a pool size of (2,2), which reduces the spatial dimensions of the output of the previous layer by half Table 1. The second Conv2D layer has 64 filters, a kernel size of 3, and ReLU activation function. Additionally, the MaxPooling 2D layer is applied with a pool size of (2,2). The next layer flattens the output of the previous layer into a one-dimensional array and the dense layer is applied. The model is compiled using the Adam optimizer, categorical crossentropy loss function, and accuracy metric. The model is trained on the training data for 100 epochs with a validation split of 0.2. The accuracy of the CNN model obtained is 0.925. We chose to implement our model using a frontend web application to show the results with a better user interface.
We implemented a web application using flask. It very simple to use, once we upload the desired scanned image of a kidney the application shows the whether the person has a tumor, or not, immediately by reading the scanned image. Necessary actions can be taken by the person immediately without any further delay.
commands to run:
python app.py
If you are using Mac with m1 chip Pre-requisites: You need to set up a virtual environment:
conda config –set auto_activate_base false
conda activate mlp
python app.py
IDE’s – PyCharm
The CNN model generated more accurate results for this dataset. This model has the least loss for training and testing. We can conclude that by using this application, users can upload directly their images and predict the kidney stone and take immediate action without delay.
Data are available in Kaggle.
All authors declare that they have no conflicts of interest.
No Funding for this project.
S K Devarapalli, Data Analysis, Literature Review, Coding, Web Development, Visualization, Interpretation, Writing the original paper.
A K Tadivaka, Data Analysis, Literature Review, Coding, Web Development, Visualization, Interpretation, Writing the original paper.
Z Anwar, Paper Review, Supervisor, Validation
E Snir, Paper Review, Supervisor, Validation
R Shoela, Data Collection, Data validation
B Bastani, Administration of Medical part, Review the Paper, Validation
B Rahmani, Administration of Analytics part, Review the Paper, Validation
Not Applicable.
We give our consent for the publication of exclusive details, that could be included figures and tables and details within the manuscript to be published in journal.
Authors consent to participate in this project and we know that: the research may not have direct benefit to us. Our participation is entirely volunteer. There is a right to withdraw from the project at any time without any consequences.
Bio chemistry
University of Texas Medical Branch, USADepartment of Criminal Justice
Liberty University, USADepartment of Psychiatry
University of Kentucky, USADepartment of Medicine
Gally International Biomedical Research & Consulting LLC, USADepartment of Urbanisation and Agricultural
Montreal university, USAOral & Maxillofacial Pathology
New York University, USAGastroenterology and Hepatology
University of Alabama, UKDepartment of Medicine
Universities of Bradford, UKOncology
Circulogene Theranostics, EnglandRadiation Chemistry
National University of Mexico, USAAnalytical Chemistry
Wentworth Institute of Technology, USAMinimally Invasive Surgery
Mercer University school of Medicine, USAPediatric Dentistry
University of Athens , GreeceThe annual scholar awards from Lupine Publishers honor a selected number Read More...