logo
Volume 23, Issue 1 (6-2026)                   JSDP 2026, 23(1): 61-82 | Back to browse issues page

XML Persian Abstract Print


Download citation:
BibTeX | RIS | EndNote | Medlars | ProCite | Reference Manager | RefWorks
Send citation to:

Mohammadi S, Taghavian Asiabi Z, Babagoli M. Multi-class Lung Disease Detection from Enhanced CXR Images Using Ensemble Learning. JSDP 2026; 23 (1) : 5
URL: http://jsdp.rcisp.ac.ir/article-1-1475-en.html
Associate Professor, Department of Industrial Engineering, KN Toosi University of Technology, Tehran, Iran
Abstract:   (545 Views)
Every year, millions of people around the world suffer from lung diseases like COVID-19, pneumonia, and lung opacity. These illnesses are among the leading causes of death, and early diagnosis is critical for effective treatment. Chest X-rays (CXR) are commonly used because they are cheap and widely available, but they often contain noise and unclear features, which can lead to mistakes even by experienced radiologists. In this study, we wanted to see whether we could improve the accuracy of automatic lung disease detection by enhancing image quality and segmenting (isolating) the lungs. More importantly, we were curious about the order of these steps: does it matter if we enhance first and then segment, or segment first and then enhance? To answer this, we designed and compared five different image processing pipelines.
Methodology: We used a public dataset called the COVID-19 Radiography Database, which contains CXR images of four categories: COVID-19, viral pneumonia, lung opacity, and normal. To avoid bias, we balanced the dataset so that each class had exactly 1,345 images. For lung segmentation, we trained a U-Net model on another dataset of 566 X-ray images with their corresponding lung masks. This model performed very well, achieving a Dice coefficient of 0.96 and an IoU of 0.93. For image enhancement, we used a special type of neural network called a Residual Dense Neural Network (RDNN), which sharpens edges and reduces noise.
We then created five different pipelines:
  1. Plain images (no preprocessing)
  2. Enhanced images only
  3. Segmented images only
  4. Enhanced first, then segmented
  5. Segmented first, then enhanced
For each pipeline, we fed the images into seven well-known deep learning models (VGG16, VGG19, ResNet50V2, InceptionV3, MobileNet, InceptionResNetV2, and DenseNet201) that had been pre-trained on a large dataset called ImageNet. We used these models as feature extractors – meaning they pulled out important visual features from the X-rays. Then, instead of relying on just one model, we combined their predictions using an ensemble method called a meta-classifier, which learns to make the final decision based on the strengths of all seven models.
Results: The plain images (pipeline 1) gave us an accuracy of 96.38%, which is already quite good. But pipeline 2 – the enhanced images – performed even better, reaching 97.03% accuracy, along with 97.12% precision, 97.03% recall, 97.1% F1-score, and an AUC of 98.98%. This was our best result. Interestingly, when we added segmentation to the mix, performance dropped. Pipeline 3 (segmented only) achieved only 88.84% accuracy. Even more surprising, pipeline 4 (enhanced then segmented) and pipeline 5 (segmented then enhanced) gave even lower accuracies of 79.93% and 86.25%, respectively. Looking at the confusion matrices, we noticed that the most common mistakes were confusing lung opacity with pneumonia – which makes sense because these two conditions can look very similar on X-rays even to human eyes.
Conclusion: This study shows that simply enhancing CXR images with a residual dense neural network, followed by an ensemble of seven transfer learning models, can achieve state-of-the-art results (97.03% accuracy) for detecting multiple lung diseases. Surprisingly, adding lung segmentation did not help, it actually made things worse, depending on the order of operations. This finding is important because many researchers assume that segmentation always improves performance, but our results suggest otherwise for this particular task. Of course, our study has limitations: the dataset was still relatively small, and we only used X-rays (not CT scans). In the future, we plan to test our method on larger and more diverse datasets, include CT images, use data augmentation to reduce overfitting, and improve the segmentation model so it works better with enhanced images.
Article number: 5
Full-Text [PDF 2281 kb]   (334 Downloads)    
Type of Study: Research | Subject: Paper
Received: 2025/06/23 | Accepted: 2026/05/5 | Published: 2026/06/21 | ePublished: 2026/06/21

References
1. D. Visca et al., "Tuberculosis and COVID-19 interaction: a review of biological, clinical and public health effects," Pulmonology, vol. 27, no. 2, pp. 151-165, 2021. [DOI:10.1016/j.pulmoe.2020.12.012]
2. M. Sharifi Fakhim, M. Fateh, A. Fateh, and Y. Jalali, "DA-COVSGNet: Double Attentional Network for COVID Severity Grading," International Journal of Engineering, vol. 38, no. 7, pp. 1568-1582, 2025, doi: 10.5829/ije.2025.38.07a.11. [DOI:10.5829/ije.2025.38.07a.11]
3. K. Kanwal, M. Asif, S. G. Khalid, H. Liu, A. G. Qurashi, and S. Abdullah, "Current diagnostic techniques for pneumonia: A scoping review," Sensors, vol. 24, no. 13, p. 4291, 2024. [DOI:10.3390/s24134291]
4. F. Türk and Y. Kökver, "Detection of Lung Opacity and Treatment Planning with Three-Channel Fusion CNN Model," Arabian Journal for Science and Engineering, pp. 1-13, 2023. [DOI:10.1007/s13369-023-07843-4]
5. N. Rani, A. Kumar, and A. K. Bhardwaj, "Machine and deep learning techniques for smart healthcare industry: Big picture and open research challenges," Intelligent Biomedical Technologies and Applications for Healthcare 5.0, pp. 255-275, 2025. [DOI:10.1016/B978-0-443-22038-8.00017-9]
6. S. Kim, B. Rim, S. Choi, A. Lee, S. Min, and M. Hong, "Deep learning in multi-class lung diseases' classification on chest X-ray images," Diagnostics, vol. 12, no. 4, p. 915, 2022. [DOI:10.3390/diagnostics12040915]
7. S. Sathitratanacheewin, P. Sunanta, and K. Pongpirul, "Deep learning for automated classification of tuberculosis-related chest X-Ray: dataset distribution shift limits diagnostic performance generalizability," Heliyon, vol. 6, no. 8, 2020. [DOI:10.1016/j.heliyon.2020.e04614]
8. X. W. Gao, C. James-Reynolds, and E. Currie, "Analysis of tuberculosis severity levels from CT pulmonary images based on enhanced residual deep learning architecture," Neurocomputing, vol. 392, pp. 233-244, 2020. [DOI:10.1016/j.neucom.2018.12.086]
9. A. Alghadhban, R. A. Ramadan, and M. Alazmi, "Advancing respiratory disease diagnosis: A deep learning and vision transformer-based approach with a novel X-ray dataset," Computers in Biology and Medicine, vol. 194, p. 110501, 2025. [DOI:10.1016/j.compbiomed.2025.110501]
10. حسینی، سیده زهره، رادفر، رضا، نصیری‌پور، امیراشکان، رجب‌زاده قطری، علی، «طراحی الگوریتم بهینة تشخیص سریع بیماری کووید۱۹ برپایة اینترنت اشیا»، پردازش علائم و داده‌ها،; ۲۰ (۳)، صفحات ۸۷-۱۰۲، ۱۴۰۲.
10. S. Z. Hosseini, R. Radfar, A. Nasiripour, and A. Rajabzadeh Ghatary, "Designing an optimal diagnosis algorithm based on IoT for Covid-19," Signal and Data Processing, vol. 20, no. 3, pp. 87-102, 2023. [DOI:10.61186/jsdp.20.3.87]
11. کریمی‌زاده، آرزو، ولی، منصور، مدرسی، محمدرضا، «تقارن اطلاعات فرکانسی صدای ریة راست و چپ و تشخیص عفونت در بیماران فیبروز کیستیک»، پردازش علائم و داده‌ها، ۱۷ (۲)، صفحات ۷۰-۵۹، ۱۳۹۹.
11. A. Karimizadeh and M. Vali, "Symmetry of Frequency information in Right and Left Lung sound and Infection Detection in Cystic Fibrosis Patients," Signal and Data Processing, vol. 17, no. 2, pp. 70-59, 2020. [DOI:10.29252/jsdp.17.2.70]
12. M. K. Mahbub, M. Biswas, L. Gaur, F. Alenezi, and K. Santosh, "Deep features to detect pulmonary abnormalities in chest X-rays due to infectious diseaseX: Covid-19, pneumonia, and tuberculosis," Information Sciences, vol. 592, pp. 389-401, 2022. [DOI:10.1016/j.ins.2022.01.062]
13. G. M. M. Alshmrani, Q. Ni, R. Jiang, H. Pervaiz, and N. M. Elshennawy, "A deep learning architecture for multi-class lung diseases classification using chest X-ray (CXR) images," Alexandria Engineering Journal, vol. 64, pp. 923-935, 2023. [DOI:10.1016/j.aej.2022.10.053]
14. G. Liang and L. Zheng, "A transfer learning method with deep residual network for pediatric pneumonia diagnosis," Computer methods and programs in biomedicine, vol. 187, p. 104964, 2020. [DOI:10.1016/j.cmpb.2019.06.023]
15. Z. Zhao, L. Alzubaidi, J. Zhang, Y. Duan, and Y. Gu, "A comparison review of transfer learning and self-supervised learning: Definitions, applications, advantages and limitations," Expert Systems with Applications, vol. 242, p. 122807, 2024. [DOI:10.1016/j.eswa.2023.122807]
16. P. Kora et al., "Transfer learning techniques for medical image analysis: A review," Biocybernetics and Biomedical Engineering, vol. 42, no. 1, pp. 79-107, 2022. [DOI:10.1016/j.bbe.2021.11.004]
17. H. Farsi, S. Noursoleimani, S. Mohamadzadeh, and A. Barati, "Multimodal Biomedical Image Segmentation by Using Multi-Path U-Net," International Journal of Engineering, vol. 38, no. 1, pp. 179-193, 2025, doi: 10.5829/ije.2025.38.01a.17. [DOI:10.5829/ije.2025.38.01a.17]
18. مرادی، بیژن، خلج، مهران، تقی‌زاده هرات، علی، «الگوی یادگیری جمعی بهبود‌یافته با هوش ازدحامی جهت پیش‌بینی ریزش مشترکان تلفن همراه»، پردازش علائم و داده‌ها، ۲۰ (۴)، صفحات 45-66، ۱۴۰۲.
18. B. Moradi, M. Khalaj and A. Taghizadeh Harat, "Improved Ensemble Learning Model by Swarm Intelligence for Mobile Subscribers' Churn Prediction," Signal and Data Processing, vol. 20, no. 4, pp. 45-66, 2024. [DOI:10.61186/jsdp.20.4.45]
19. K. V. Aishwarya and A. Asuntha, "A survey on comparative study of lung nodules applying machine learning and deep learning techniques," Multimedia Tools and Applications, vol. 84, no. 5, pp. 2127-2181, 2025. [DOI:10.1007/s11042-024-20009-0]
20. M. A. Al-qaness et al., "Chest x-ray images for lung disease detection using deep learning techniques: a comprehensive survey," Archives of Computational Methods in Engineering, vol. 31, no. 6, pp. 3267-3301, 2024. [DOI:10.1007/s11831-024-10081-y]
21. A. S. Varde, D. Karthikeyan, and W. Wang, "Facilitating COVID recognition from X-rays with computer vision models and transfer learning," Multimedia Tools and Applications, vol. 83, no. 1, pp. 807-838, 2024. [DOI:10.1007/s11042-023-15744-9]
22. P. Podder et al., "Lddnet: a deep learning framework for the diagnosis of infectious lung diseases," Sensors, vol. 23, no. 1, p. 480, 2023. [DOI:10.3390/s23010480]
23. X. Xue et al., "Design and analysis of a deep learning ensemble framework model for the detection of COVID-19 and pneumonia using large-scale CT scan and X-ray image datasets," Bioengineering, vol. 10, no. 3, p. 363, 2023. [DOI:10.3390/bioengineering10030363]
24. S. Agrawal, V. Honnakasturi, M. Nara, and N. Patil, "Utilizing deep learning models and transfer learning for COVID-19 detection from X-ray images," SN Computer Science, vol. 4, no. 4, p. 326, 2023. [DOI:10.1007/s42979-022-01655-3]
25. N. D. Kathamuthu et al., "A deep transfer learning-based convolution neural network model for COVID-19 detection using computed tomography scan images for medical applications," Advances in Engineering Software, vol. 175, p. 103317, 2023. [DOI:10.1016/j.advengsoft.2022.103317]
26. Y. H. Bhosale and K. S. Patnaik, "PulDi-COVID: Chronic obstructive pulmonary (lung) diseases with COVID-19 classification using ensemble deep convolutional neural network from chest X-ray images to minimize severity and mortality rates," Biomedical Signal Processing and Control, vol. 81, p. 104445, 2023. [DOI:10.1016/j.bspc.2022.104445]
27. X. Fu, R. Lin, W. Du, A. Tavares, and Y. Liang, "Explainable hybrid transformer for multi-classification of lung disease using chest X-rays," Scientific Reports, vol. 15, no. 1, p. 6650, 2025. [DOI:10.1038/s41598-025-90607-x]
28. A. Whata, K. Dibeco, K. Madzima, and I. Obagbuwa, "Uncertainty quantification in multi-class image classification using chest X-ray images of COVID-19 and pneumonia," Frontiers in Artificial Intelligence, vol. 7, p. 1410841, 2024. [DOI:10.3389/frai.2024.1410841]
29. V. Ravi, V. Acharya, and M. Alazab, "A multichannel EfficientNet deep learning-based stacking ensemble approach for lung disease detection using chest X-ray images," Cluster Computing, vol. 26, no. 2, pp. 1181-1203, 2023. [DOI:10.1007/s10586-022-03664-6]
30. S. Ashwini, J. Arunkumar, R. T. Prabu, N. H. Singh, and N. P. Singh, "Diagnosis and multi-classification of lung diseases in CXR images using optimized deep convolutional neural network," Soft Computing-A Fusion of Foundations, Methodologies & Applications, vol. 28, 2024. [DOI:10.1007/s00500-023-09480-3]
31. L. T. Duong, P. T. Nguyen, L. Iovino, and M. Flammini, "Automatic detection of Covid-19 from chest X-ray and lung computed tomography images using deep neural networks and transfer learning," Applied Soft Computing, vol. 132, p. 109851, 2023. [DOI:10.1016/j.asoc.2022.109851]
32. V. Arora, E. Y.-K. Ng, R. S. Leekha, M. Darshan, and A. Singh, "Transfer learning-based approach for detecting COVID-19 ailment in lung CT scan," Computers in biology and medicine, vol. 135, p. 104575, 2021. [DOI:10.1016/j.compbiomed.2021.104575]
33. F. J. M. Shamrat, S. Azam, A. Karim, K. Ahmed, F. M. Bui, and F. De Boer, "High-precision multiclass classification of lung disease through customized MobileNetV2 from chest X-ray images," Computers in Biology and Medicine, vol. 155, p. 106646, 2023. [DOI:10.1016/j.compbiomed.2023.106646]
34. K. COVID, "Radiography Database," Radiological Society of North America (2019). Available online at: https://www. kaggle. com/tawsifurrahman/covid19-radiography-database (accessed October 1, 2021).
35. A. Bustos, A. Pertusa, J.-M. Salinas, and M. De La Iglesia-Vaya, "Padchest: A large chest x-ray image dataset with multi-label annotated reports," Medical image analysis, vol. 66, p. 101797, 2020. [DOI:10.1016/j.media.2020.101797]
36. N. S. Shaik and T. K. Cherukuri, "Transfer learning based novel ensemble classifier for COVID-19 detection from chest CT-scans," Computers in Biology and Medicine, vol. 141, p. 105127, 2022. [DOI:10.1016/j.compbiomed.2021.105127]
37. نمیرانیان، فریبا، لطیف، علی محمد، «ارائة رویکردی نوین در بخش‌بندی تصاویر دیجیتال به‌وسیلة الگوریتم ژنتیک و جنگل تصادفی»، پردازش علائم و داده‌ها، 20 (4)، ش 58، 35-44، 1402.
37. F. Namiranian and A. Latif, "A New Approach for Digital Image Segmentation with Genetic Algorithm and Random Forest," Signal and Data Processing, vol. 20, no. 4, pp. 35-44, 2024. [DOI:10.61186/jsdp.20.4.35]
38. T. Rahman et al., "Exploring the effect of image enhancement techniques on COVID-19 detection using chest X-ray images," Computers in biology and medicine, vol. 132, p. 104319, 2021. [DOI:10.1016/j.compbiomed.2021.104319]
39. T. Rahman et al., "Reliable tuberculosis detection using chest X-ray with deep learning, segmentation and visualization," IEEE Access, vol. 8, pp. 191586-191601, 2020. [DOI:10.1109/ACCESS.2020.3031384]
40. F. Bagheri, M. Tarokh, and M. Ziaratban, "Semantic segmentation of lesions from dermoscopic images using Yolo-DeepLab networks," International Journal of Engineering, vol. 34, no. 2, pp. 458-469, 2021. [DOI:10.5829/ije.2021.34.02b.18]
41. J. Ma et al., "Toward data‐efficient learning: A benchmark for COVID‐19 CT lung and infection segmentation," Medical physics, vol. 48, no. 3, pp. 1197-1210, 2021. [DOI:10.1002/mp.14676]
42. W. M. Salama and M. H. Aly, "Framework for COVID-19 segmentation and classification based on deep learning of computed tomography lung images," Journal of Electronic Science and Technology, vol. 20, no. 3, p. 100161, 2022. [DOI:10.1016/j.jnlest.2022.100161]
43. M. Dabass, S. Vashisth, and R. Vig, "MTU: A multi-tasking U-net with hybrid convolutional learning and attention modules for cancer classification and gland Segmentation in Colon Histopathological Images," Computers in Biology and Medicine, vol. 150, p. 106095, 2022. [DOI:10.1016/j.compbiomed.2022.106095]
44. A. Muis, S. Sunardi, and A. Yudhana, "Cnn-based approach for enhancing brain tumor image classification accuracy," Int. J. Eng, vol. 37, no. 5, pp. 984-996, 2024. [DOI:10.5829/IJE.2024.37.05B.15]
45. A. Tripathi, T. Singh, R. R. Nair, and P. Duraisamy, "Improving early detection and classification of lung diseases with innovative MobileNetV2 framework," IEEE Access, 2024. [DOI:10.1109/ACCESS.2024.3440577]
46. H. A. Sanghvi, R. H. Patel, A. Agarwal, S. Gupta, V. Sawhney, and A. S. Pandya, "A deep learning approach for classification of COVID and pneumonia using DenseNet‐201," International Journal of Imaging Systems and Technology, vol. 33, no. 1, pp. 18-38, 2023. [DOI:10.1002/ima.22812]
47. C. Peng, Y. Liu, X. Yuan, and Q. Chen, "Research of image recognition method based on enhanced inception-ResNet-V2," Multimedia Tools and Applications, vol. 81, no. 24, pp. 34345-34365, 2022. [DOI:10.1007/s11042-022-12387-0]
48. J. D. Bodapati and V. Rohith, "ChxCapsNet: Deep capsule network with transfer learning for evaluating pneumonia in paediatric chest radiographs," Measurement, vol. 188, p. 110491, 2022. [DOI:10.1016/j.measurement.2021.110491]
49. M. E. Sahin, "Deep learning-based approach for detecting COVID-19 in chest X-rays," Biomedical Signal Processing and Control, vol. 78, p. 103977, 2022. [DOI:10.1016/j.bspc.2022.103977]
50. A. Bhattacharyya, D. Bhaik, S. Kumar, P. Thakur, R. Sharma, and R. B. Pachori, "A deep learning based approach for automatic detection of COVID-19 cases using chest X-ray images," Biomedical Signal Processing and Control, vol. 71, p. 103182, 2022. [DOI:10.1016/j.bspc.2021.103182]
51. G. Bargshady, X. Zhou, P. D. Barua, R. Gururajan, Y. Li, and U. R. Acharya, "Application of CycleGAN and transfer learning techniques for automated detection of COVID-19 using X-ray images," Pattern Recognition Letters, vol. 153, pp. 67-74, 2022. [DOI:10.1016/j.patrec.2021.11.020]

Add your comments about this article : Your username or Email:
CAPTCHA

Send email to the article author


Rights and permissions
Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.