Automated Computer-Assisted Diagnosis of Pleural Effusion in Chest X-Rays via Deep Learning
Abstract
1. Introduction
- This study employs image segmentation to pre-process lung X-rays, retaining only the lower half of the lungs, from below the heart to the costophrenic angle, thereby enabling the model to focus more effectively on the target region.
- An effective image enhancement approach is introduced, which improves model performance by 4.33% compared with results obtained without enhancement.
- The proposed system integrates image cropping, image enhancement, and CNN classification, achieving an accuracy of 927%, representing a substantial improvement of 21.30% over existing studies.
2. Methods
2.1. Image Preprocessing for CXR Image
2.1.1. Standardization Negative
2.1.2. AHE
2.1.3. Binarization
2.2. Image Segmentation
2.3. Image Enhancement
2.3.1. Histogram Stretching
Algorithm 1. Histogram Stretching. |
Input
: filtering input image. : Scaling constant. : Dimensions of the input image. Output : Transformed output image. Hint: x min, max: minimum and maximum pixel values in input image |
2.3.2. Sobel Gradient Edge Detection
Algorithm 2. Sobel Gradient Edge Detection. |
|
2.4. CNN Training and Validation
3. Results
3.1. Performance Metrics
3.2. Comparison of Single-Lung and Whole-Lung Inputs
3.3. Evaluation of Different Image Enhancement Method
3.4. The Classification Results of CNN
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Tripathy, R.K.; Dash, S.; Rath, A.; Panda, G.; Pachori, R.B. Automated Detection of Pulmonary Diseases From Lung Sound Signals Using Fixed-Boundary-Based Empirical Wavelet Transform. IEEE Sens. Lett. 2022, 6, 7001504. [Google Scholar] [CrossRef]
- Chen, Z.; Zhou, Y.P.; Liu, X.; Jiang, X.; Wu, T.; Ghista, D.; Xu, X.Q.; Zhang, H.; Jing, Z.C. A Personalized Pulmonary Circulation Model to Non-Invasively Calculate Fractional Flow Reserve for Artery Stenosis Detection. IEEE Trans. Biomed. Eng. 2022, 69, 1435–1448. [Google Scholar] [CrossRef] [PubMed]
- Roy, A.; Thakur, A.; Satija, U. VGAResNet: A Unified Visibility Graph Adjacency Matrix-Based Residual Network for Chronic Obstructive Pulmonary Disease Detection Using Lung Sounds. IEEE Sens. Lett. 2023, 7, 7006604. [Google Scholar] [CrossRef]
- Shah, P.M.; Ullah, F.; Shah, D.; Gani, A.; Maple, C.; Wang, Y.; Abrar, M.; Islam, S.U. Deep GRU-CNN Model for COVID-19 Detection From Chest X-Rays Data. IEEE Access 2022, 10, 35094–35105. [Google Scholar] [CrossRef] [PubMed]
- Serte, S.; Serener, A. Early pleural effusion detection from respiratory diseases including COVID-19 via deep learning. In Proceedings of the 2020 Medical Technologies Congress (TIPTEKNO), Antalya, Turkey, 19–20 November 2020; pp. 1–4. [Google Scholar] [CrossRef]
- Hu, J.; Zhang, C.; Zhou, K.; Gao, S. Chest X-Ray Diagnostic Quality Assessment: How Much Is Pixel-Wise Supervision Needed? IEEE Trans. Med. Imaging 2022, 41, 1711–1723. [Google Scholar] [CrossRef]
- Wu, Y.; Kong, Q.; Zhang, L.; Castiglione, A.; Nappi, M.; Wan, S. CDT-CAD: Context-Aware Deformable Transformers for End-to-End Chest Abnormality Detection on X-Ray Images. IEEE/ACM Trans. Comput. Biol. Bioinform. 2024, 21, 823–834. [Google Scholar] [CrossRef]
- Nahiduzzaman, M.; Goni, M.O.F.; Anower, M.S.; Islam, M.R.; Ahsan, M.; Haider, J.; Gurusamy, S.; Hassan, R.; Islam, M.R. A Novel Method for Multivariant Pneumonia Classification Based on Hybrid CNN-PCA Based Feature Extraction Using Extreme Learning Machine With CXR Images. IEEE Access 2021, 9, 147512–147526. [Google Scholar] [CrossRef]
- Paranjape, K.; Schinkel, M.; Nanayakkara, P. Short Keynote Paper: Mainstreaming Personalized Healthcare–Transforming Healthcare Through New Era of Artificial Intelligence. IEEE J. Biomed. Health Inform. 2020, 24, 1860–1863. [Google Scholar] [CrossRef] [PubMed]
- Ahmed, I.; Jeon, G.; Piccialli, F. From Artificial Intelligence to Explainable Artificial Intelligence in Industry 4.0: A Survey on What, How, and Where. IEEE Trans. Ind. Inform. 2022, 18, 5031–5042. [Google Scholar] [CrossRef]
- Sogancioglu, E.; Van Ginneken, B.; Behrendt, F.; Bengs, M.; Schlaefer, A.; Radu, M.; Xu, D.; Sheng, K.; Scalzo, F.; Marcus, E.; et al. Nodule Detection and Generation on Chest X-Rays: NODE21 Challenge. IEEE Trans. Med. Imaging 2024, 43, 2839–2853. [Google Scholar] [CrossRef]
- Ji, H.; Li, J.; Wang, L.; Fan, L.; Zhang, Y.; Wang, W. COVID-19 Detection in CXR Image Using High Frequency Emphasis Filtering Based Convolutional Neural Network. In Proceedings of the 2022 IEEE 11th Data Driven Control and Learning Systems Conference (DDCLS), Chengdu, China, 3–5 August 2022; pp. 929–934. [Google Scholar] [CrossRef]
- Bhadra, R.; Kar, S. COVID Detection from CXR Scans using Deep Multi-layered CNN. In Proceedings of the 2020 IEEE Bombay Section Signature Conference (IBSSC), Mumbai, India, 4–6 December 2020; pp. 214–218. [Google Scholar] [CrossRef]
- Liu, Y.; Liang, Z.; Yang, J.; Yuan, S.; Wang, S.; Huang, W.; Wu, A. Diagnostic and comparative performance for the prediction of tuberculous pleural effusion using machine learning algorithms. Int. J. Med. Inform. 2024, 182, 105320. [Google Scholar] [CrossRef]
- Thapa, M.; Kaur, R. An Explainable Deep—Learning based Multi-Label Image Classification for Chest X-Rays. Procedia Comput. Sci. 2025, 258, 2425–2434. [Google Scholar] [CrossRef]
- Furriel, B.C.; Paulo, A.J.; Ribeiro, G.A.; Santos, P.V.; Reis, E.P.; Mendes, G.S.; Paiva, J.Q.; Loureiro, R.M.; Rittner, L.; Reis, M.R. Convolutional Neural Network for Pleural Effusion Classification. In Proceedings of the 2023 IEEE Latin American Conference on Computational Intelligence (LA-CCI), Recife-Pe, Brazil, 29 October–1 November 2023; pp. 1–6. [Google Scholar] [CrossRef]
- Serte, S.; Serener, A. Classification of COVID-19 and pleural effusion on chest radiographs using CNN fusion. In Proceedings of the 2021 International Conference on INnovations in Intelligent SysTems and Applications (INISTA), Kocaeli, Turkey, 25–27 August 2021; pp. 1–6. [Google Scholar] [CrossRef]
- Chowdary, G.J.; Kanhangad, V. A Dual-Branch Network for Diagnosis of Thorax Diseases From Chest X-Rays. IEEE J. Biomed. Health Inform. 2022, 26, 6081–6092. [Google Scholar] [CrossRef] [PubMed]
- Taphorn, K.; Mechlem, K.; Sellerer, T.; De Marco, F.; Viermetz, M.; Pfeiffer, F.; Pfeiffer, D.; Herzen, J. Direct Differentiation of Pathological Changes in the Human Lung Parenchyma With Grating-Based Spectral X-ray Dark-Field Radiography. IEEE Trans. Med. Imaging 2021, 40, 1568–1578. [Google Scholar] [CrossRef] [PubMed]
- Ijaz, A.; Akbar, S.; AlGhofaily, B.; Hassan, S.A.; Saba, T. Deep Learning for Pneumonia Diagnosis Using CXR Images. In Proceedings of the 2023 Sixth International Conference of Women in Data Science at Prince Sultan University (WiDS PSU), Riyadh, Saudi Arabia, 14–15 March 2023; pp. 53–58. [Google Scholar] [CrossRef]
- Langarizadeh, M.; Mahmud, R.; Ramli, A.R.; Napis, S.; Beikzadeh, M.R.; Rahman, W.E.Z.W.A. Improvement of digital mammogram images using histogram equalization, histogram stretching and median filter. J. Med. Eng. Technol. 2011, 35, 103–108. [Google Scholar] [CrossRef]
- AS, R.A.; Gopalan, S. Comparative Analysis of Eight Direction Sobel Edge Detection Algorithm for Brain Tumor MRI Images. Procedia Comput. Sci. 2022, 201, 487–494. [Google Scholar] [CrossRef]
- Sedgwick, P. Log transformation of data. BMJ 2012, 345, e6727. [Google Scholar] [CrossRef]
- Sahu, S.; Singh, A.K.; Ghrera, S.P.; Elhoseny, M. An approach for de-noising and contrast enhancement of retinal fundus image using CLAHE. Opt. Laser Technol. 2019, 110, 87–98. [Google Scholar] [CrossRef]
- Li, X.; Hu, H.; Zhao, L.; Wang, H.; Yu, Y.; Wu, L.; Liu, T. Polarimetric image recovery method combining histogram stretching for underwater imaging. Sci. Rep. 2018, 8, 12430. [Google Scholar] [CrossRef]
- Gao, W.; Zhang, X.; Yang, L.; Liu, H. An improved Sobel edge detection. In Proceedings of the 2010 3rd International Conference on Computer Science and Information Technology, Chengdu, China, 9–11 July 2010; pp. 67–71. [Google Scholar] [CrossRef]
- Sun, J.; Lv, Y.; Tang, C.; Sima, H.; Wu, X. Face Recognition Based on Local Gradient Number Pattern and Fuzzy Convex-Concave Partition. IEEE Access 2020, 8, 35777–35791. [Google Scholar] [CrossRef]
- Ding, F.; Zhu, G.; Yang, J.; Xie, J.; Shi, Y.-Q. Edge Perpendicular Binary Coding for USM Sharpening Detection. IEEE Signal Process. Lett. 2015, 22, 327–331. [Google Scholar] [CrossRef]
- Bao, P.; Zhang, L.; Wu, X. Canny edge detection enhancement by scale multiplication. IEEE Trans. Pattern Anal. Mach. Intell. 2005, 27, 1485–1490. [Google Scholar] [CrossRef]
- Huang, J.; Mei, L.; Long, M.; Liu, Y.; Sun, W.; Li, X.; Shen, H.; Zhou, F.; Ruan, X.; Wang, D.; et al. BM-Net: CNN-Based MobileNet-V3 and Bilinear Structure for Breast Cancer Detection in Whole Slide Images. Bioengineering 2022, 9, 261. [Google Scholar] [CrossRef] [PubMed]
- Tsivgoulis, M.; Papastergiou, T.; Megalooikonomou, V. An improved SqueezeNet model for the diagnosis of lung cancer in CT scans. Mach. Learn. Appl. 2022, 10, 100399. [Google Scholar] [CrossRef]
- Baygin, M.; Yaman, O.; Barua, P.D.; Dogan, S.; Tuncer, T.; Acharya, U.R. Exemplar Darknet19 feature generation technique for automated kidney stone detection with coronal CT images. Artif. Intell. Med. 2022, 127, 102274. [Google Scholar] [CrossRef] [PubMed]
- Shanthi, T.; Sabeenian, R.S. Modified Alexnet architecture for classification of diabetic retinopathy images. Comput. Electr. Eng. 2019, 76, 56–64. [Google Scholar] [CrossRef]
- Goutham, V.; Sameerunnisa, A.; Babu, S.; Prakash, T.B. Brain Tumor Classification using EfficientNet-B0 Model. In Proceedings of the 2022 2nd International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE), Greater Noida, India, 28–29 April 2022; pp. 2503–2509. [Google Scholar] [CrossRef]
- Wang, X.; Peng, Y.; Lu, L.; Lu, Z.; Bagheri, M.; Summers, R.M. ChestX-ray8: Hospital-scale Chest X-ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 3462–3471. [Google Scholar] [CrossRef]
Hardware Platform | Version |
---|---|
CPU | Intel® Core™ i5-12400 |
GPU | NVIDIA GeForce RTX™ 3060 Ti |
Software platform | Version |
Matlab | 2023a |
Hyperparameter | Value |
---|---|
Learning Rate | 0.00001 |
Batch Size | 32 |
Epochs | 20 |
Database | Training | Validation | Total |
---|---|---|---|
Normal Lung | 369 | 92 | 461 |
Pleural Effusion | 369 | 92 | 461 |
Ground Truth Value | |||
---|---|---|---|
True | False | ||
Predicted Value | True | (True Positive) | (False Positive) |
False | (False Negative) | (True Negative) |
Left Lung | Right Lung | Average Lungs | Whole Lungs | |
---|---|---|---|---|
Accuracy | 66.30% | 73.37% | 69.84% | 84.24% |
Precision | 79.87% | 82.62% | 81.25% | 86.97% |
Recall | 66.30% | 73.37% | 69.84% | 84.24% |
F1 Score | 61.99% | 71.34% | 66.67% | 83.94% |
Original | Log Transform | CLAHE | Histogram Stretch | |
---|---|---|---|---|
Accuracy | 87.50% | 64.13% | 87.50% | 89.67% |
Precision | 88.52% | 77.38% | 88.04% | 90.06% |
Recall | 87.50% | 64.13% | 87.50% | 89.67% |
F1 Score | 87.42% | 59.19% | 87.46% | 89.65% |
Histogram Stretch | Histogram Stretch + Canny | Histogram Stretch + Sharpen | Histogram Stretch + Sobel Gradient | |
---|---|---|---|---|
Accuracy | 89.67% | 83.15% | 88.04% | 91.85% |
Precision | 90.06% | 83.16% | 88.50% | 91.86% |
Recall | 89.67% | 83.15% | 88.04% | 91.85% |
F1 Score | 89.65% | 83.15% | 88.01% | 91.85% |
Mobilenet_v3 | Squeezenet | Darknet19 | Alexnet | Efficientnet_b0 | |
---|---|---|---|---|---|
Accuracy | 77.53% | 90.02% | 89.49% | 92.74% | 93.27% |
Method in [17] | Method in [5] | Method in [16] | Method in [14] | Method in [15] | This Work | |
---|---|---|---|---|---|---|
Accuracy (%) | 83.00 | 77.00 | 91.00 | 87.70 | 87.18 | 93.27 |
Precision (%) | 99.00 | 82.25 | 84.21 | 85.30 | N/A | 92.95 |
Recall (%) | 75.00 | 91.50 | 100.00 | 94.70 | N/A | 92.81 |
F1 score (%) | 75.00 | 82.00 | 91.43 | 86.00 | N/A | 92.79 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Huang, Y.-Y.; Lin, Y.-C.; Tsai, S.-H.; Chi, T.-K.; Chen, T.-Y.; Chung, S.-W.; Li, K.-C.; Tu, W.-C.; R. Abu, P.A.; Chen, C.-C. Automated Computer-Assisted Diagnosis of Pleural Effusion in Chest X-Rays via Deep Learning. Diagnostics 2025, 15, 2322. https://doi.org/10.3390/diagnostics15182322
Huang Y-Y, Lin Y-C, Tsai S-H, Chi T-K, Chen T-Y, Chung S-W, Li K-C, Tu W-C, R. Abu PA, Chen C-C. Automated Computer-Assisted Diagnosis of Pleural Effusion in Chest X-Rays via Deep Learning. Diagnostics. 2025; 15(18):2322. https://doi.org/10.3390/diagnostics15182322
Chicago/Turabian StyleHuang, Ya-Yun, Yu-Ching Lin, Sung-Hsin Tsai, Tsun-Kuang Chi, Tsung-Yi Chen, Shih-Wei Chung, Kuo-Chen Li, Wei-Chen Tu, Patricia Angela R. Abu, and Chih-Cheng Chen. 2025. "Automated Computer-Assisted Diagnosis of Pleural Effusion in Chest X-Rays via Deep Learning" Diagnostics 15, no. 18: 2322. https://doi.org/10.3390/diagnostics15182322
APA StyleHuang, Y.-Y., Lin, Y.-C., Tsai, S.-H., Chi, T.-K., Chen, T.-Y., Chung, S.-W., Li, K.-C., Tu, W.-C., R. Abu, P. A., & Chen, C.-C. (2025). Automated Computer-Assisted Diagnosis of Pleural Effusion in Chest X-Rays via Deep Learning. Diagnostics, 15(18), 2322. https://doi.org/10.3390/diagnostics15182322