# Pneumonia Detection on Chest X-ray Images Using Ensemble of Deep Convolutional Neural Networks
###### Abstract  
Preunonia is a life-threatening lung infection resulting from several different viral infections. Identifying and treating pneumonia on chest X-ray images can be difficult due to its similarity to other pulmonary diseases. Thus, the existing methods for predicting pneumonia cannot attain substantial levels of accuracy. This paper presents a computer-aided classification of pneumonia, coined Ensemble Learning (EL), to simplify the diagnosis process on chest X-ray images. Our proposal is based on Convolutional Neural Network (CNN) models, which are pretrained CNN models that have been recently employed to enhance the performance of many medical tasks instead of training CNN models from scratch. We propose to use three well-known CNNs (DenseNet169, MobileNetV2, and Vision Transformer) pretrained using the ImageNet database. These models are trained on the chest X-ray data set using fine-tuning. Finally, the results are obtained by combining the extracted features from these three models during the experimental phase. The proposed EL approach outperforms other existing state-of-the-art methods and obtains an accuracy of 93.91% and a F1-score of 93.88% on the testing phase. image processing; deep learning; medical image classification; ensemble deep learning; vision transformer +
Footnote †: journal: Applied  
tuberculosis identification [7], tuberculosis segmentation [8], large-scale recognition [9], COVID-19 detection [10; 11], and Radiograph classification [12]. The automated classification of chest X-ray images using DL models is growing rapidly, and choosing an appropriate region of interest (ROI) on chest X-ray images was used to discover pneumonia [13]. Furthermore, applying the DL modes helps to avoid problems that take a long time to solve in traditional approaches. However, these models require large volumes of well-labeled training samples. To solve this problem, Transfer Learning (TL) has been developed. Due to its capacity to effectively solve the shortcomings of reinforcement learning and supervised learning, TL is becoming more widespread [14; 15]. TL has the following types: Unsupervised, inductive, transductive, and negative learning. These types have been demonstrated to be able to tackle the DL problems [16]. To enhance accuracy, TL is essential to have the most suggestive contextual and exclusionary capacity in the feature extraction stage for many fields [17]. For example, online scraping [18], social media [19], sentiment classification [20], and medical image classification [17]. Therefore, this paper applies TL approaches to improve diagnostic reliability and reduce time-consuming decisions for clinicians. We have proposed a new NN, coined as EL, which is built by training CNN models using TL methods. To achieve this goal, CNN's MobileNet [21], DenseNet [22], and Vision Transformer [23] methods were trained to detect pneumonia in chest X-ray images. We have decided to use three models to generate the proposed ensemble learning method trying to combine two approaches that, separately, have obtained promising results: on the one hand, using the best CNN models for the training stage; on the other hand, applying a vision transformer. Regarding the former, the authors of [24] proposed to use the best two CNN models to develop an ensemble learning solution. They built a hierarchical stacked method by using the most relevant features extracted by the selected two convolution networks, and they obtained a good performance. Additionally, Vision Transformer (VIT) has recently achieved highly competitive performance for several computer vision applications [25]. Furthermore, VIT achieves remarkable results compared to CNN while it obtains fewer computational resources for pretraining [23].