Automated detection of kidney stones from CT scan images using handcrafted texture features and ensemble machine lLearning

Authors

  • Sohaib Munir Punjab University College of Information Technology https://orcid.org/0009-0007-7023-1815
  • Maha Imran Department of Computer Science, Punjab University College of Information Technology, Lahore, Pakistan
  • Zobia Suhail Department of Computer Science, Punjab University College of Information Technology, Lahore, Pakistan

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

Author Biography

Sohaib Munir, Punjab University College of Information Technology

Sohaib Munir is a Research Assistant and Computer Science researcher with interests in Medical Imaging, Artificial Intelligence in Healthcare, Deep Learning, Machine Learning, Computer Vision, Biomedical Signal Processing, and Data Science. His work focuses on AI-driven healthcare solutions, medical image analysis, pattern recognition, and intelligent systems, with emerging interests in sensor data analytics and multimodal AI applications.
MPhil Scholar
PUCIT, Lahore
Sr. Lecturer
KFUEIT Affiliate Colleges

Downloads

Published

25-09-2026

How to Cite

Munir, S., Imran, M., & Suhail, Z. (2026). Automated detection of kidney stones from CT scan images using handcrafted texture features and ensemble machine lLearning. Pakistan Journal of Radiology, 36(3). Retrieved from https://pakjr.com/index.php/PJR/article/view/1991

Issue

Section

Original Articles