A Development and Validation of an AI Model for Cardiomegaly Detection in Chest X-rays
Abstract
:1. Introduction
2. Related Research
2.1. Medical Data and Artificial Intelligence
2.2. Application to Cardiomegaly
2.3. Model Evaluation
3. Experiments
3.1. Preprocessing Data
3.2. Building the Model
3.2.1. VGG-16
Algorithm 1 VCD (VGG-16 for Cardiomegaly Detection) Modeling | |
1: | function VCD Model |
2: | base_model <- VGG16(weights = “imagenet,” include_top = False, input_shape = (224, 224, 3)) |
3: | for layer in base_model.layers do |
4: | layer.trainable = False |
5: | end for |
6: | x <- Flatten()(base_model.output) |
7: | x <- Dense(256, activation = “relu”)(x) |
8: | x <- Dropout(0.5)(x) |
9: | predictions <- Dense(1, activation = “sigmoid”)(x) |
10: | model <- Model(inputs = base_model.input, outputs = predictions) |
11: | model.compile(optimizer = “adam,” loss = “binary_crossentropy,” metrics = [“accuracy”]) |
12: | return model |
13: | end function |
3.2.2. Inception-V3
Algorithm 2 IVCD (InceptionV3 for Cardiomegaly Detection) Modeling | |
1: | function IVCD Model |
2: | base_model <- InceptionV3 (include_top = False, weights = “imagenet,” input_shape = (224, 224, 3)) |
3: | x <- GlobalAveragePooling2D()(base_model.output) |
4: | predictions <- Dense(1, activation = “sigmoid”)(x) |
5: | model <- Model(inputs = base_model.input, outputs = predictions) |
6: | model.compile(optimizer = Adam(learning_rate = 0.0001), loss = “binary_crossentropy,” metrics |
= [“accuracy”]) | |
7: | return model |
8: | end function |
3.2.3. DenseNet121
Algorithm 3 DNCD (DenseNet for Cardiomegaly Detection) | |
1: | function DNCD |
2: | Variable |
3: | dirs ← [“train,” “validation”, “test”] |
4: | train_datagen ← ImageDataGenerator(rescale = 1.0/255, zoom_range = 0.2) |
5: | validation_test_datagen ← ImageDataGenerator(rescale = 1.0/255) |
6: | function DENSENET_MODELING |
7: | base.model ← DenseNet121(include.top = False, weights = “imagenet”, input.shape = (224, 224, 3)) |
8: | x ← GlobalAveragePooling2D()(base.model.output) |
9: | predictions ← Dense(1, activation = “sigmoid”) (x) |
10: | model ← Model(inputs = base.model.input, outputs = predictions) |
11: | end function |
12: | end function |
3.3. Inspection Model
3.3.1. Saliency Map
Algorithm 4 Compute Saliency Map | |
1: | function COMPUTE_SALIENCY_MAP |
2: | Compute Gradients |
3: | Use GradientTape to record operations for automatic differentiation: |
4: | with tf.GradientTape() as tape: |
5: | Watch img.tensor |
6: | preds ← model(img.tensor) |
7: | loss ← preds[:, class.index] |
8: | Compute gradients of loss with respect to img.tensor: |
9: | grads ← tape.gradient(loss, img.tensor)[0] |
10: | Compute Saliency |
11: | saliency ← tf.reduce_max(tf.abs (grads), axis = −1).numpy() |
12: | Normalize Saliency Map |
13: | Normalize saliency: |
14: | saliency ← (saliency − saliency.min())/(saliency.max() − saliency.min()) |
15: | return saliency |
16: | end function |
3.3.2. Guided Backpropagation
Algorithm 5 Compute-Guided Backpropagation | |
1: | function GUIDEDRELU(x) |
2: | Apply Guided ReLU during backpropagation: |
3: | if x is greater than 0 and the partial derivative of y with respect to x is |
4: | greater than 0 then |
5: | guided_relu ← x |
6: | else |
7: | guided_relu ← 0 |
8: | return guided_relu |
9: | end function |
10: | function GUIDEDBACKPROPAGATION(grads) |
11: | Calculate guided backpropagation gradients: |
12: | guided_grads ← grads.numpy() |
13: | return guided_grads |
14: | end function |
4. Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Geric, C.; Qin, Z.Z.; Denkinger, C.M.; Kik, S.V.; Marais, B.; Anjos, A.; Trajman, A. The rise of artificial intelligence reading of chest X-rays for enhanced TB diagnosis and elimination. Int. J. Tuberc. Lung Dis. 2023, 27, 367–372. [Google Scholar] [CrossRef]
- Messerli, F.H.; Schmieder, R. Left ventricular hypertrophy: A cardiovascular risk factor in essential hypertension. Drugs 1986, 31, 192–201. [Google Scholar] [CrossRef]
- Kim, H.J.; Jeong, M.H.; Yoon, H.J.; Kim, Y.C.; Sohn, S.J.; Kim, M.C.; Park, J.C. Difference of clinical outcomes according to left ventricular hypertrophy and its subtype in Korean patients with acute myocardial infarction. Korean J. Med. 2020, 95, 387–397. [Google Scholar] [CrossRef]
- Bennani, S.; Regnard, N.E.; Ventre, J.; Lassalle, L.; Nguyen, T.; Ducarouge, A.; Chassagnon, G. Using AI to improve radiologist performance in detection of abnormalities on chest radiographs. Radiology 2023, 309, e230860. [Google Scholar] [CrossRef]
- Ballantyne, A.; Schaefer, G.O. Consent and the ethical duty to participate in health data research. J. Med. Ethics 2018, 44, 392–396. [Google Scholar] [CrossRef] [PubMed]
- Nam, J.G.; Kim, M.; Park, J.; Hwang, E.J.; Lee, J.H.; Hong, J.H.; Park, C.M. Development and validation of a deep learning algorithm detecting 10 common abnormalities on chest radiographs. Eur. Respir. J. 2021, 57, 200399. [Google Scholar] [CrossRef]
- Sarpotdar, S.S. Cardiomegaly detection using deep convolutional neural network with U-net. arXiv 2022, arXiv:2205.11515. [Google Scholar]
- Song, K.D.; Kim, M.; Do, S. The Latest Trends in the Use of Deep Learning in Radiology Illustrated through the Stages of Deep Learning Algorithm Development. J. Korean Soc. Radiol. 2019, 80, 202–212. [Google Scholar] [CrossRef]
- Kateb, Y.; Meglouli, H.; Khebli, A. Coronavirus diagnosis based on chest X-ray images and pre-trained DenseNet-121. Rev. Intell. Artif. 2023, 37, 23. [Google Scholar] [CrossRef]
- Que, Q.; Tang, Z.; Wang, R.; Zeng, Z.; Wang, J.; Chua, M.; Veeravalli, B. CardioXNet: Automated detection for cardiomegaly based on deep learning. In Proceedings of the 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Honolulu, HI, USA, 18–21 July 2018; pp. 612–615. [Google Scholar]
- Jung, W.Y.; Kim, J.H.; Park, J.E.; Kim, M.J.; Lee, J.M. Evaluation of classification performance of Inception V3 algorithm for chest X-ray images of patients with cardiomegaly. J. Korean Soc. Radiol. 2021, 15, 455–461. [Google Scholar]
- Kim, M.J.; Kim, J.H. Proposal of a Convolutional Neural Network Model for the Classification of Cardiomegaly in Chest X-ray Images. J. Korean Soc. Radiol. 2021, 15, 613–620. [Google Scholar] [CrossRef]
- Ribeiro, E.; Cardenas, D.A.; Krieger, J.E.; Gutierrez, M.A. Interpretable deep learning model for cardiomegaly detection with chest X-ray images. In Proceedings of the XXIII Simpósio Brasileiro de Computação Aplicada à Saúde, Florianópolis, Brazil, 7–10 June 2023; SBC: Florianópolis, Brazil, 2023; pp. 340–347. [Google Scholar]
- Sogancioglu, E.; Murphy, K.; Calli, E.; Scholten, E.T.; Schalekamp, S.; Van Ginneken, B. Cardiomegaly detection on chest radiographs: Segmentation versus classification. IEEE Access 2020, 8, 94631–94642. [Google Scholar] [CrossRef]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar]
- Lee, H.S.; Kim, J.G.; Yoo, J.W.; Jung, Y.S.; Kim, S.S. A study on multi-class classification using convolutional neural networks based on transfer learning. J. Korean Inst. Intell. Syst. 2018, 28, 531–537. [Google Scholar]
- Innat, M.; Hossain, M.F.; Mader, K.; Kouzani, A.Z. A convolutional attention mapping deep neural network for classification and localization of cardiomegaly on chest X-rays. Sci. Rep. 2023, 13, 6247. [Google Scholar] [CrossRef] [PubMed]
- Decoodt, P.; Liang, T.J.; Bopardikar, S.; Santhanam, H.; Eyembe, A.; Garcia-Zapirain, B.; Sierra-Sosa, D. Hybrid classical–quantum transfer learning for cardiomegaly detection in chest X-rays. J. Imaging 2023, 9, 128. [Google Scholar] [CrossRef]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
- Lin, C.; Li, L.; Luo, W.; Wang, K.C.; Guo, J. Transfer learning based traffic sign recognition using inception-v3 model. Period. Polytech. Transp. Eng. 2019, 47, 242–250. [Google Scholar] [CrossRef]
- Potsangbam, J.; Devi, S.S. Classification of Breast Cancer Histopathological Images Using Transfer Learning with DenseNet121. Procedia Comput. Sci. 2024, 235, 1990–1997. [Google Scholar] [CrossRef]
- O’Shea, K.; Nash, R. An introduction to convolutional neural networks. arXiv 2015, arXiv:1511.08458. [Google Scholar]
- Iandola, F.; Moskewicz, M.; Karayev, S.; Girshick, R.; Darrell, T.; Keutzer, K. Densenet: Implementing efficient convnet descriptor pyramids. arXiv 2014, arXiv:1404.1869. [Google Scholar]
- Simonyan, K.; Vedaldi, A.; Zisserman, A. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv 2013, arXiv:1312.6034. [Google Scholar]
- Dong, G.; Ma, Y.; Basu, A. Feature-guided CNN for denoising images from portable ultrasound devices. IEEE Access 2021, 9, 28272–28283. [Google Scholar] [CrossRef]
1 | The activation value must be positive. |
2 | The relevance in the previous layer must be positive. |
3 | The relevance in the next layer must be positive. |
VCD | IVCD | DNCD | |
---|---|---|---|
Accuracy | 0.91 | 0.92 | 0.95 |
Precision | 0.87 | 1.00 | 0.98 |
Recall | 1.00 | 0.83 | 0.91 |
Loss | 0.21 | 0.02 | 0.11 |
F1 Score | 0.93 | 0.91 | 0.94 |
AUC | 0.99 | 0.99 | 0.99 |
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. |
© 2024 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
Lee, K.-H.; Choi, J.-W.; Park, C.-O.; Han, D.-H.; Kang, M.-S. A Development and Validation of an AI Model for Cardiomegaly Detection in Chest X-rays. Appl. Sci. 2024, 14, 7465. https://doi.org/10.3390/app14177465
Lee K-H, Choi J-W, Park C-O, Han D-H, Kang M-S. A Development and Validation of an AI Model for Cardiomegaly Detection in Chest X-rays. Applied Sciences. 2024; 14(17):7465. https://doi.org/10.3390/app14177465
Chicago/Turabian StyleLee, Kang-Hee, Jun-Woo Choi, Chun-Oh Park, Dong-Hun Han, and Min-Soo Kang. 2024. "A Development and Validation of an AI Model for Cardiomegaly Detection in Chest X-rays" Applied Sciences 14, no. 17: 7465. https://doi.org/10.3390/app14177465