Automated detection of kidney stones from CT scan images using handcrafted texture features and ensemble machine lLearning
Abstract
Background: Nephrolithiasis (stone in kidney) is the most frequently encountered problem in urology, which affects around 10 percent of people during their lifetime. Non-Contrast Computed Tomography (CT) is the gold standard for diagnosis; however, its manual reading is very time-consuming, subjective and dependent on different readers. The aim of this study was to design a fully automated machine learning pipeline for classifying CT images into two classes, i.e., Normal and Stone.
Objective: For the development of an interpretable machine learning framework that uses manually designed texture features to identify kidney stones in CT scan images and its diagnostic efficiency on comparison with different classical classification techniques.
Methods: An openly accessible Kaggle data set of 4,114 CT images (3,274 Normal and 840 Stone) was utilized. Synthetic Minority Oversampling Technique (SMOTE) was used to balance the class ratio to 3.9:1. A 69-dimensional feature vector was created from 1st order features (mean, variance, standard deviation, entropy, skewness, kurtosis), 2nd order features extracted from GLCM (contrast, correlation, energy, homogeneity) and 59-bin LBP histogram. The five machine learning algorithms selected were Decision Tree, Random Forest, Logistic Regression, Support Vector Machine, and K-Nearest Neighbor. The models were developed and validated by performing stratified 5-fold cross-validation and then finally evaluating the model on test set (n=823).
Results: Random Forest Classifier attained the highest performance, having obtained an accuracy of 99.73%, and a precision, recall, and F1 score of 1.00. On the other hand, Decision Tree attained an accuracy of 99.18%. Logistic Regression and Support Vector Machine did worse (78.72% and 80.34% respectively), which suggests that the decision boundary is not linear. GLCM features alone had the highest single-family accuracy (99.93% by Random Forest).
Conclusion: The use of texture features crafted manually, the application of SMOTE to tackle the problem of data imbalance, and classification using an ensemble approach enables near perfect detection accuracy of kidney stones at a small fraction of the computational expense compared to deep learning algorithms.
Keywords: Kidney calculi; Tomography, X-ray computed; Machine learning; Image processing, computer-assisted; Random forest
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Pakistan Journal of Radiology

This work is licensed under a Creative Commons Attribution 4.0 International License.